News for hackers. Stuff that matters.
Re:Why I Use Perl: Reliability by adrianhoward on Tuesday May 29, 2012 @04:50PM (#4039804)
First one (not 100% sure it's constant memory, I think perl optimises the for to avoid instantiating the (1..$n) list:

It does since 5.005 - so for a good long time now :-)

The reduce version (again, I'm unsure of const mem req). Comes in at ~1.4s:

This would allocate the array I'm afraid. You'd could use something liek List::Gen's reduce() to get around that.

There are no comments on this comment yet.