<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog InterGraphicDESIGNS &#187; velocidad</title>
	<atom:link href="http://www.intergraphicdesigns.com/blog/tag/velocidad/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.intergraphicdesigns.com/blog</link>
	<description>Blog InterGraphicDESIGNS</description>
	<lastBuildDate>Mon, 30 Jan 2012 02:16:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tips para evaluar velocidad de scripts de PHP</title>
		<link>http://www.intergraphicdesigns.com/blog/2008/11/20/tips-para-evaluar-velocidad-de-scripts-de-php/</link>
		<comments>http://www.intergraphicdesigns.com/blog/2008/11/20/tips-para-evaluar-velocidad-de-scripts-de-php/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 15:00:00 +0000</pubDate>
		<dc:creator>igdonline</dc:creator>
				<category><![CDATA[PHP y MySQL]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[microtime]]></category>
		<category><![CDATA[optimización]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rendimiento]]></category>
		<category><![CDATA[velocidad]]></category>

		<guid isPermaLink="false">http://www.intergraphicdesigns.com/blog/general/tips-para-evaluar-velocidad-de-scripts-de-php/</guid>
		<description><![CDATA[No todos los scripts PHP son igual de rápidos aunque funcionalmente logren el mismo objetivo, el sitio web &#8220;The PHP Benchmark&#8221; es una iniciativa que pretende evaluar diferentes prácticas de programación en PHP y demostrar cuántos milisegundos toma realizar la misma acción pero ejecutando funciones diferentes. El proyecto es encabezado por Chris Vincent, y utiliza [...]]]></description>
			<content:encoded><![CDATA[<p>No todos los scripts PHP son igual de rápidos aunque funcionalmente logren el mismo objetivo, el sitio web &#8220;<a href="http://www.phpbench.com/">The PHP Benchmark</a>&#8221; es una iniciativa que pretende evaluar diferentes prácticas de programación en PHP y demostrar cuántos milisegundos toma realizar la misma acción pero ejecutando funciones diferentes.</p>
<p>El proyecto es encabezado por Chris Vincent, y utiliza la <a href="http://cr.php.net/microtime">función microtime() de PHP</a> para publicar este tipo de resultados.</p>
<p><span style="font-style: italic;">Algunos ejemplos interesantes:</span></p>
<p><span style="font-weight: bold;">Utilizar for ($i=0; $i<$size; $i++)" en vez de utilizar "for ($i=0; $i<sizeof></p>
<p></sizeof></span><span><sizeof>Pues el cálculo de la función sizeOf o count toma mucho tiempo de ejecución.</p>
<p><span style="font-style: italic;">Resultados:</span></p>
<p>Precalculando el tamaño del array: 132 milisegundos.<br />Calculando el tamaño del array en cada iteración: <span>57296 milsegundos</span></sizeof></span><span style="font-weight: bold;"><sizeof></p>
<p><span style="font-weight: bold;">Resultados interesantes con la función echo():</span></p>
<p></sizeof></span><span><sizeof>echo &#8216;aaaaaaaaaaaaaaaaaaaaaaaaaaaa&#8217;: 139 milisegundos.<br />echo &#8216;aaaaaaa&#8217;,'aaaaaaa&#8217;,'aaaaaaa&#8217;,'aaaaaaa&#8217;: 278 milisegundos.</sizeof></span><span style="font-weight: bold;"><sizeof></p>
<p><span style="font-weight: bold;">Utilizar foreach en vez de utilizar while:</span></p>
<p></sizeof></span><span><sizeof>foreach($aHash as $val); 14 milisegundos.</p>
<p>while(list($key) = each($aHash)) $tmp[] = $aHash[$key]; 98 milisegundos.</p>
<p>Le invitamos a leer más conclusiones en el sitio web y hacer sus propias estimaciones utilizando la función microtime() en sus propias aplicaciones.</sizeof></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intergraphicdesigns.com/blog/2008/11/20/tips-para-evaluar-velocidad-de-scripts-de-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

