This has been delayed because of a) the need for a real-world example to diffuse the possibility of critisism for using an artifical example; b) the difficulty in actually making the translated code work.

Starting with the full solution to Re^4: Restore the original order of an array after sort and performing some funchtion on array values, and using a dataset size per Re^6: Restore the original order of an array after sort and performing some funchtion on array values,

this code 4000: Took 1.369 seconds:

Standard Perl:

Converted to use autobox::Core,

it requires 4000: Took 237.630 seconds:

(Partially) autoboxed code:

I get that to be a 99.5% slowdown.

Update: It was pointed out that the above figure is deceptive, in that what it shows is that the standard perl version took just 0.5% of the time that the autoboxed version took. Looked at the other way around, the autoboxed version took 17000% longer.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

In reply to autobox performance:a real-world comparison by BrowserUk

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.