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.
In reply to autobox performance:a real-world comparison by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |