Premature optimization

$ python -B run_game.py
Warning: Cython not installed, using slower Python vector implementation
Average FPS: 70.7130024164
$ sudo apt-get install cython
[...]
$ python -B run_game.py
Average FPS: 153.46775698

(log in to comment)

Comments

Ahh. Nice :)
I don't think that's very premature. Yes, you don't need it to run at 150 fps on any particular machine, but not everyone's machine is as fast as yours. I'm going to try to keep my framerate at at least 100fps. But we'll see how long that lasts. :)
cython is nice, isn't it?
I'm very fond of Cython. I made two versions of my 2d vector class: one in Python and one in Cython. My program (I don't think I can call it a game yet) detects if Cython is installed and uses the Cython version if it is. If not, it falls back on the Python version.