3 ms·
Nice article! Lots of deja vu there :) (I'm a tools programmer working at Treyarch) Here is another little thing you can optimize out (probably not saving much
by malkia 14y ago
Nice article! Lots of deja vu there :) (I'm a tools programmer working at Treyarch)
Here is another little thing you can optimize out (probably not saving much, but still bugs me):
SoftwareOcclusionCulling/CPUT/CPUT/CPUT.h:#define SAFE_DELETE(p) {if((p)){HEAPCHECK; delete (p); (p)=NULL;HEAPCHECK; }}
SoftwareOcclusionCulling/CPUT/CPUT/CPUT.h:#define SAFE_DELETE_ARRAY(p){if((p)){HEAPCHECK; delete[](p); (p)=NULL;HEAPCHECK; }}
There is no need to check for NULL array or pointer before calling delete[] or delete, the standard allows for it.
Lots of stuff coming from Intel is just badly written for some reason. Few years ago there was the SMOKE demo using Thread Building Blocks, and there were O(N^2) and even O(N^3) things for the particles.
Intel, you are supposed to show us how to code to the metal... Or maybe their ICC compiler is specifically better if you write this way (lol, what a conspiracy).