[Tutor] python, speed, game programming

Danny Yoo dyoo at hashcollision.org
Sun Jan 5 04:30:44 CET 2014


There's an assumption in the question here that all programs are CPU bound.

I actually do not think so.  From prior discussion about what the
program is doing, I got the impression that it was trying to hold
gigabytes of data in RAM.  Isn't that still true?  If so, then I would
be very surprised if the program were not thrashing virtual memory.
Under such conditions, give up on any assumptions about program speed
being related to CPU speed.  It's hitting disk hard, and that's a Game
Over.  Under heavy virtual memory swapping conditions, it doesn't
matter how fast your CPU is: the time that your program is taking is
due to the physical act of moving spindles and spinning disks of metal
around.


More information about the Tutor mailing list