In the game I am writing, I use the class of 2D vectors that I wrote to handle the speeds of objects. This is called a large number of times each frame, since there are many objects on the screen, so any increase that I can make at its speed will be useful.
It is quite simple, consisting mainly of wrappers for related mathematical functions. It would be pretty trivial to rewrite in C, but I'm not sure if this will make any significant difference, since all it really does is call basic math functions, add, multiply or split.
So my question is, under what circumstances does it make sense to rewrite in C? Where will you see a significant speedup, and where can you see a reasonable speed without overwriting the vast amount of the program?
source
share