in reply to Re^3: does a hash element as a loop parameter cause significant slowdown?
in thread does a hash element as a loop parameter cause significant slowdown?

Yeah ... I already noticed this, but gave up searching the deltas because I started in the 5.8 era and remember being told about the "problem"

But now I found it in the delta of 5.005

> foreach (1..1000000) is now optimized into a counting loop. It does not try to allocate a 1000000-size list anymore.

It's the oldest available delta, which probably means only Perl4 had the issue.

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^4: does a hash element as a loop parameter cause significant slowdown?