Sorry, those aren't my terms. :) Dispatching opcodes is a
description I've heard of how Perl executes the code that
it has compiled. So Perl has a fairly high overhead per
The constructs to focus on when optimizing are the
contructs that take the big chunk of the time. And usually
the only big win you have when optimizing is to change the
algorithm, that is, change the whole way you do things.
Tweaking tiny things here and there is usually a waste of
Now occasionally you can do something simple like change
a s/\W+//g to tr/a-zA-Z0-9_//cd and get a big speed
improvement IF you are doing that operation on a
huge number of really long strings.
Another way to look at is, if you need to use Benchmark.pm
in order figure out which of two ways is faster, then it
probably isn't worth your time to be worrying about that
"optimization". Using Benchmark.pm is a good way to figure
out how much faster something is. And it can be
fun and/or interesting to compare things with Benchmark.pm.
But if you don't have a real problem that runs noticeably
faster after your change, then the change really didn't make
(but my friends call me "Tye")
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||