In languages like C this kind of optimization is meaningless because the compiler is smart enough to know when to do it for you. But Perl has to make a trade-off between compiling well and runtime performance, so doesn't make this trade-off.
If Perl had a JIT compiler then this would go away as well. The Parrot folks have promised a JIT compiler for Perl 6, but I've stopped holding my breath on waiting for that to happen.
In reply to Re^10: How to speed up a nested loop?
by tilly
in thread How to speed up a nested loop?
by Xenofur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |