In this case transliteration is really the most efficient solution though. Consider the results of adding         "xlit_$sizes[$_]"     => '$_ = $::d[' . $_ . ']; tr/0-9//cd;', to the benchmark:
Rate simple_10 multiple_10 xlit_10 simple_10 86400/s -- -31% -70% multiple_10 124615/s 44% -- -57% xlit_10 292712/s 239% 135% -- Rate simple_25 multiple_25 xlit_25 simple_25 45324/s -- -49% -82% multiple_25 88062/s 94% -- -65% xlit_25 248802/s 449% 183% -- Rate simple_50 multiple_50 xlit_50 simple_50 23823/s -- -71% -89% multiple_50 82566/s 247% -- -62% xlit_50 218684/s 818% 165% -- Rate simple_100 multiple_100 xlit_100 simple_100 13397/s -- -69% -92% multiple_100 43191/s 222% -- -74% xlit_100 168434/s 1157% 290% -- Rate simple_250 multiple_250 xlit_250 simple_250 5608/s -- -71% -95% multiple_250 19639/s 250% -- -81% xlit_250 103656/s 1748% 428% -- Rate simple_500 multiple_500 xlit_500 simple_500 2832/s -- -72% -95% multiple_500 10189/s 260% -- -83% xlit_500 59072/s 1986% 480% -- Rate simple_1000 multiple_1000 xlit_1000 simple_1000 1380/s -- -77% -96% multiple_1000 5939/s 330% -- -83% xlit_1000 34457/s 2397% 480% --
Esp in large data sets, transliteration screams.

Makeshifts last the longest.


In reply to Re^3: Strip non-numeric by Aristotle
in thread Strip non-numeric by FireBird34

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.