Thursday, April 19

Geek

Hey Hey!

I went ahead and implemented a first pass of the performance enhancing technique I spoke about earlier.  The template parser still handles data tags purely using lookup tables - this is not the full smart-parser version - so it requires some extra setup effort that may be wasted in the end.

The first cut of it was somewhat disappointing - 10%, maybe 15% faster.  I decided to experiment further to see if I could do better than that.  The first version was creating custom objects with formatting codes and dropping them into the lookup table; I decided to try just using raw tuples (a Python built-in structure, essentially a fixed list). 

That did the job: Gains jumped to over 40%.  Object creation seems to be about as expensive as a function call, so I was eating up most of my potential improvement right there.

I'll bash on it for a couple of days, then put the new engine into this Sunday's update.

Posted by: Pixy Misa at 11:22 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 164 words, total size 1 kb.

1 " I went ahead and implemented a first pass of the performance enhancing technique I spoke about earlier."

hehehe

(sorry, couldn't resist!)

Posted by: kyer at Thursday, April 19 2007 11:28 PM (i+d8H)

2 wink

Posted by: Pixy Misa at Thursday, April 19 2007 11:41 PM (PiXy!)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
45kb generated in CPU 0.0213, elapsed 0.1546 seconds.
56 queries taking 0.1454 seconds, 328 records returned.
Powered by Minx 1.1.6c-pink.