Help save net neutrality! Learn more.
Close

#41 Profile and optimize generated code

open
nobody
None
5
2008-08-19
2008-08-19
No

Devel::NYTProf revealed some time-bandits in the generated code.

- the generated subs "require Foo" late (and on every call). Require all at startup.

- the generated code checks for "blessed $self" on every method. Thats a) pretty useless (well, at least for people following the docs) and b) a waste of time.

... and some more.

Skimming fat may seem silly at this level, but the "require" yields around 1.5/100s, and "blessed $self" around 0.5/100s on my machine. Run it 100 times and you saved 2 seconds...

Discussion


Log in to post a comment.