[TYPO3-dev] FYI: comparing execution speed of some php functions
Franz Koch
typo.removeformessage at fx-graefix.de
Fri Jun 26 19:57:39 CEST 2009
Hi,
> What about comparing it to something like this?
>
> foreach (array_keys($arr) as $key) {
> // do smthg that needs only $key
> }
it should be slower. You would have to cache array_keys to a variable to
gain a bit speed - but even then you would still have the overhead of
calling array_keys. On the other hand you might save some memory if the
array contains huge objects compared to iterating the array directly.
--
kind regards,
Franz Koch
---------------------------------------------------
PayPal-Account: 'paypal _at_ elements-net _dot_ de'
---------------------------------------------------
More information about the TYPO3-dev
mailing list