The problem is related to the available memory size. About available_MB_of_mem * 10000 iterations need to be run before the undef, by my estimates. Any other amount will change the outcome and hide the problem.
The question isn't *if* there is something the first pass, the question is *what* is different.
True, you could use Benchmark to repeat the bit after the undef, but that's not what you were suggesting initially. You were suggesting using it for *both* snippets.
In reply to Re^4: Use of undef slowing down perl?
by ikegami
in thread Use of undef slowing down perl?
by thalej
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |