?????????
????????????С??????2?????????????????????????????????????????????????????????????????C/C++????????????Щ?ο????壬????е?????????????????????????????????????????????£?
????1. ?μ?Ahmdal????

????funccost????????func?????????????funcspeedup??????????????????????
????????????????TriangleIntersect()???40%??????????????????????????п?????????????????????????????25%??
????????ζ???????????????????????????????????????????????糡??????????
????????????????????????е?????Ч?????y?????????????????????
????2. ??????????????????????
??????????????8???????д?????????????????????????8??????????
???????????????????????е?????ζ??????????
??????????????????????????????Щ???????????????????????????
???????????????????????????????????????????????????????????????????????????——????????????????????????????????Щ??????????????????????????????????????
????3. ??Щ??????????д???????Ч???????????????????????????????????????д????????????????????
????4. ???/????????????????????????????????
???????????ó?????洢????????????????????
???????????????????????飻
??????????????????????????????????????
??????????????????????罫for(i=0;i<100;i++) DoSomething();?????DoSomething()????DoSomething()????
??????????if...else if...else if...else if...??????????????????????????????????????????????????????????switch??????????????????????????????в???????????????switch???????????????????????if????????????????
????5. ?????????????????
??????????????????????????????????洢??????????array[i][j]?? array[i][j+1]????????C/C++?????????array[i][j]??array[i+1][j]?????????????????
????????????????е?????????????????????????????????????????????????????
????????CPU????????м??????????????????????????????????????????????????????????????????????????????????????????????cache?У??????????????array[i][j]??CPU?????У????array[i][j+1]???п?????????????????array[i+1][j]????????????У?
????6. ?????????????(IPL)
???????????????????????У????????CPU???????????????????????????????ζ???CPU??????????4????????????????4?????????????м?????????????????
???????????????????????????饗?????????????У?????????????????CPU??????????
???????????????????????????
????????????????????????????????
????7. ???????????????????
????????????????洢??????????????????洢???????С???????????£???????????????洢??????????????????????????????????????????????????
??????????????????ж???????????????????
????8. ????????????????
???????????????????????——????????????洢???
????9. ???壨??????????????????????????
????????????????У??????????vector??points??colors??????????м???????????????
????10. ???????????????????????????????
????11. ??????????????????
?????????????????????????????????????????????????????????????
?????????Σ?char??short????????????????????????????洢????????????????????32λ??64λ?????????????С????????
????12. ??????C++?????????С??
??????ó????(Color c(black))????????(Color c?? c = black)??????????
????13. ???????????????????????
????????????????????????????磬????????????????
??????Щ??????????????????????????????????????????????
??????ù????????б?????Color::Color() : r(0)?? g(0)?? b(0) {}??????Color::Color() { r = g = b = 0; } ????
????14. ???????????λ??????>>??<<????????????????????
????15. С????ò?????
???????????????????????????磬???????????????????????????????????????????????????????????????????????????棩???????????????????????????????????в???????????????????????????????CPU???????????????
??????????????£???????????????????????GPU????У????????????????????????