Oh thank you. The difference moved to 110 versus 220:
Rate rosetta_old rosetta_new eertree
rosetta_old 20.0/s -- -98% -98%
rosetta_new 864/s 4222% -- -27%
eertree 1177/s 5784% 36% --
Rate rosetta_old rosetta_new eertree
rosetta_old 2.63/s -- -99% -100%
rosetta_new 215/s 8058% -- -67%
eertree 654/s 24749% 205% --
1..2
I missed the - $n because I was trying to get all the palindromes from the Rosetta code instead of just the unique ones. It seemed the new code worked correctly, but the old one didn't, so I started experimenting with replicating its incorrect output...
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.