amorilia/pyffi — pull request #2 by infectedsoundsystem (2011-10-18 20:41:58+00:00)
Title: Micro-performance changes, and Py3k fix

I've been browsing through the nif optimising code, and making small changes if anything happened to jump out at me. I was going to wait until some more substantial changes had been made before sending a pull request, but I've found a Py3k problem: izip being used in the skin data optimising code, causing an exception when niftoaster is used on creatures etc.

As to the other micro-optimisations & changes, I've been testing them as I go, and so far seem to have got a barely noticeable <1% decrease in CPU time with them on certain nifs, negligible, but still an improvement.

Here's a quick benchmark, ran against 4 copies of tenpennychandelierdark.nif using Python 3.2.2

master:

real 1m25.261s
user 2m46.372s
sys 0m0.797s

real 1m25.035s
user 2m45.936s
sys 0m0.753s

real 1m25.335s
user 2m46.526s
sys 0m0.787s

performance:

real 1m24.903s
user 2m43.726s
sys 0m0.827s

real 1m24.141s
user 2m44.023s
sys 0m0.707s

real 1m24.328s
user 2m43.133s
sys 0m0.820s

Cheers :)