in reply to Re: Re: Re: grep, map vs. foreach performance
in thread grep, map vs. foreach performance
Ok, that's synonymous. Yet, unless I got something completely wrong (then please correct me), constructs like
for($i=0; $i < @array; $i++){ print $array[$i]++ }; # Thanks for the dollar, jeffa ;)
do something different internally. Of course, the second is generally the better/faster approach (unless you don't need $i for something else in the loop, since $i is an unnecessary artificial variable in the first example)).
So long,
Flexx
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) 5Re: grep, map vs. foreach performance
by jeffa (Bishop) on Sep 04, 2002 at 14:50 UTC | |
by Flexx (Pilgrim) on Sep 04, 2002 at 16:46 UTC | |
by sauoq (Abbot) on Sep 04, 2002 at 21:40 UTC | |
by Flexx (Pilgrim) on Sep 05, 2002 at 07:28 UTC |