| 
	
 | 
 Posted by Alvaro G. Vicario on 07/06/06 19:35 
*** Markus Ernst escribió/wrote (Thu, 06 Jul 2006 10:52:50 +0200): 
> So I wonder which is more efficient - overwriting the array entry at  
> every loop, or checking for it with the if statement. 
 
A quick dirty benchmark with loops and microtime(), using the code you 
posted, shows that assigning is slightly faster that testing, running from 
command line. The saving ranges from 3% to 6%. 
 
If you're interested in these issues you may like Xdebug and WinCacheGrind: 
 
http://xdebug.org/ 
http://sourceforge.net/projects/wincachegrind/ 
 
 
 
--  
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain 
++ Mi sitio sobre programación web: http://bits.demogracia.com 
+- Mi web de humor con rayos UVA: http://www.demogracia.com 
--
 
[Back to original message] 
 |