Hola, Matts, all.
This probably isn't as big an improvement as tilly's above, but you can avoid a branch if you check $] at compiletime using a BEGIN block and play a little symref magic to have two different nextchar routines.
Also, though using lexical variables is generaly a win because of maintainablity, if you're trying to get the last ounce of performance, try declaring your 'my' variables at the widest scope you can (file scope), and seeing how much that helps. IIRC, creating a lexical is expensive.
Try running a line-level profiler, or even running a profiler on perl instead of your program.
TACCTGTTTGAGTGTAACAATCATTCGCTCGGTGTATCCATCTTTG ACACAATGAATCTTTGACTCGAACAATCGTTCGGTCGCTCCGACGCIn reply to Re: XML::SAX::PurePerl Performance
by theorbtwo
in thread XML::SAX::PurePerl Performance
by Matts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |