[TYPO3-core] RFC: #13670: Performance optimization: change while(list() to foreach()

Vladimir Podkovanov admin at sitesfactory.ru
Thu May 20 15:28:46 CEST 2010


Ernesto Baschny [cron IT] wrote:

> 
> I haven't checked if all our accesses are read-only, but I am pretty
> confident that most of them are, which makes the change is justified.
> For the ones that aren't I think it makes sense to keep it "foreach" to
> keep it consistent readable.
> 
> We could agree to keep while/each on modify-loops which are heavily
> used. To spot those we need more benchmarking.
> 
> Cheers,
> Ernesto

BTW, maybe foreach with reference: foreach($array as $key => &$value) 
could be good enough in modify loops in regard to perfomance. Didn't 
test though.
-- 
-rgds-
Vladimir


More information about the TYPO3-team-core mailing list