Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Replacing commonly used general purpose opcodes with tailor made ones to optimise common constructs seems like relatively unexplored ground.

    An example would be something like the work I recently did with if(%foo){}. Consider something like:

      @list = split //,$str;

    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

    • 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