[TYPO3-core] RFC: #847: error in tslib_fe->getFromCache()
Steffen Kamper
info at sk-typo3.de
Sat Jul 26 12:47:19 CEST 2008
Dmitry Dulepov [typo3] schrieb:
> Hi!
>
> Steffen Kamper wrote:
>> fire an E_NOTICE costs performance, even if it's not displayed. So
>> declare of vars or check on isset will raise performance, don't you
>> agree?
>
> Nope. I do not agree until I see some numbers.
>
ok, here are your numbers:
$s = microtime(1);
for ($i = 0; $i < 100000; $i++) { if($GLOBALS['not_existing']) {$k++;} }
$e = microtime(1);
echo 'Time needed without isset: ' . ($e-$s) . "\n";
$s = microtime(1);
for ($i = 0; $i < 100000; $i++) { if(isset($GLOBALS['not_existing']))
{$k++;} }
$e = microtime(1);
echo 'Time needed with isset: ' . ($e-$s) . "\n";
Output:
Time needed without isset: 1.60987997055
Time needed with isset: 0.0281138420105
You see that performance increased with factor 80
impressed?
vg Steffen
More information about the TYPO3-team-core
mailing list