Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm looking for some places I can squeeze a little bit more performance out of a sub. dprof says this sub is running 50% of the time for my application, so it looks like my best candidate for optimization.
This is the output routine for a templating engine. It takes as parameters an object, a filehandle, and zero or more template section names to display. For each template section name, if the section exists it displays all parts of it. A part is either plain text, or else a variable; variables are looked up in the $self->[_assign] hashref. The _nosuchsec and _nosuchvar routines are error handlers, and are never called in normal operation. Here's what DProf says: %Time ExclSec CumulS #Calls sec/call Csec/c Name 51.9 21.53 21.280 130000 0.0002 0.0002 FTS::printto Any ideas where to look for that last little bit of performance? Thanks! In reply to Optimizing the bejeezus out of a sub by sgifford
|
|