in reply to Re: Is for(@$array_ref) construct optimized? YES!
in thread Is for(@$array_ref) construct optimized? YES!
This is probably version-dependent (which perl version you use?) and with less probablilty $^O-dependent (what is $^O in your case?)D:\Work\PerlScripts\utl>perl -MO=Deparse -we "$x=[];for(@$x){}" $x = []; foreach $_ (@$x) { (); } -e syntax OK D:\Work\PerlScripts\utl>perl -MO=Deparse -we "$x=[];for(;;){}" Name "main::x" used only once: possible typo at -e line 1. $x = []; for (;;) { (); } -e syntax OK D:\Work\PerlScripts\utl>perl -MO=Deparse -we "$x=[];for($i=0;$i<=$#x;$ +i++){}" $x = []; for ($i = 0; $i <= $#x; ++$i) { (); } -e syntax OK
I think we'll find common denominator soon.
update: after I saw your update I understood more and now I think we found that commond denominator that I've just mentioned. Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) 3Re: Is for(@$array_ref) construct optimized? YES!
by jeffa (Bishop) on Jun 16, 2002 at 20:22 UTC | |
by Weasel (Sexton) on Jun 16, 2002 at 20:34 UTC | |
by Aristotle (Chancellor) on Jun 16, 2002 at 21:04 UTC | |
by Weasel (Sexton) on Jun 16, 2002 at 21:12 UTC | |
by Elian (Parson) on Jun 16, 2002 at 21:30 UTC | |
| |
by Aristotle (Chancellor) on Jun 16, 2002 at 21:30 UTC |