[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] optimising render code




errr.. sorry. i havent sleeped much last days, I was doing loads of performance tests and i obviously sent an example that was totally wrong.



andrew baker(e)k dio:
I'm having a kind of hard time figuring out what's going on here. I'm guessing that x in range() is just to run the function a number of times in order to calculate relative time? If so, you might want to output the time.strftime() with whatever time format you prefer before and after the execution of the function code, to better time it.
Also, in test1(), you're throwing away z.
Finally, what's dol()? Obviously, since it's a different function than enumerate(), it might have a different overhead.


One last read you'll probably find interesting:


Python Patterns - An Optimization Anecdote


http://www.python.org/doc/essays/list2str.html



--
Andrew Ulysses Baker
"failrate"


--
altern