Name: Anonymous 2009-07-02 17:47
What are some good optimizations to speed up C/C++ code?
Most university text books will tell you to use const int for constants but I found that a simple #define is actually faster and it doesn't need any extra memory on top of that. Also I found that removing unnecessary range checks can speed up execution significantly.
What are some more tricks like that that will save machine cycles?
Most university text books will tell you to use const int for constants but I found that a simple #define is actually faster and it doesn't need any extra memory on top of that. Also I found that removing unnecessary range checks can speed up execution significantly.
What are some more tricks like that that will save machine cycles?