NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Opcode fiddling presents an opportunity? (Score:1)
An example would be something like the work I recently did with if(%foo){}. Consider something like:
@list = split
This construct can be compile time resolved and replaced with a special "splitchar" op that doesnt even think about the regexp engine or go through any of the conditionals in the normal split opcode.
Im pretty sure that there are many such optimisation opportunities available.
Yves
Reply to This
Re: (Score:1)
Problem with that is identifying the right places to build tailor-made code so you don’t waste your time optimising things no one uses.
Also, TMTOWTDI means you have to make a reasonable guess at other ways of asking for the same thing. F.ex., off the top of my head, I can think of
@list = $str =~ m//g;to do the same.But sure, if you can come up with good common optimisations, you can possibly do a lot. An area where this has already been done and that IMHO still merits attention is sort [perl.org] blocks