Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Believably slow..by Aristotle (Chancellor) |
on Jun 30, 2003 at 21:20 UTC ( [id://270333]=note: print w/replies, xml ) | Need Help?? |
Even if it didn't turn that into a no-op, it won't make a whole lot of difference. A shift operation, even with loading and saving a variable from memory and then even with stack frame related overhead, will take maybe two dozen clock cycles on a bad day (cache misses et al) on modern CPUs. In comparison, even the simplest single operation in Perl will probably take a few hundred cycles (if not thousands). If reports are to be believed though, Perl6 will be much faster at this, and native Parrot code should be on a par with C. Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|