in reply to Re: counting backward
in thread counting backward
Which is okay for small ranges; but creates a huge list for large ones.
:) seems like an easy candidate for optimization , since this is optimized for (reverse @a) is optimized
perl -le " @f = 1 .. 100_000; for(reverse @f ){ $f=$_; $f==$#f and sca +lar<> } " perl -le " @f = 1 .. 100_000; for( @f ){ $f=$_; $f==$#f and scalar<> } + "
|
|---|