Um, I hate to break it to you, but perl is fully interpreted with
no just-in-time compilation.
Every operation and
every argument passed to it in a script is dozens of branches, no matter how innocent. The way to optimize a perl program is to code it with the fewest possible operations, fewest function calls, fewest assignments to a temporary variable, and even fewest curly-brace
scopes. Optimizing a perl program is generally the opposite of making it more readable. (but there is a time and a place, etc)
For a little mind-bender, try this:
perl -MBenchmark -E '
my $x= 1;
timethese(50000000, {
mul => q{$x*$x},
sqrt => q{sqrt($x)}
})'