I am confused. Is not $_
aliased to the function argument? Why using all those references and dereferences?
Moreover, running your code with N=2**29, I am still getting
single 6.13e-03/s -- -100% -100% -100% -100%
long 2.97/s 48381% -- -1% -35% -58%
translate 3.01/s 48989% 1% -- -35% -58%
classic 4.60/s 74981% 55% 53% -- -36%
str 7.14/s 116486% 140% 137% 55% --
With 2**30, it dies with
Substitution loop at ./7.pl line 10.
Update: This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux-thread-multi
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- 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.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||