From 14d6f05f131f70272c5caa34ace9771afe4ab975 Mon Sep 17 00:00:00 2001 From: Peter Coles Date: Sat, 3 Mar 2012 14:55:29 +0000 Subject: [PATCH] Timer shouldn't be restarted after initializing the fixed array as this exaggerates its effectiveness and invalidates the performance comparison with a normal array. --- appendix_02/SplFixedArray.php | 1 - 1 file changed, 1 deletion(-) diff --git a/appendix_02/SplFixedArray.php b/appendix_02/SplFixedArray.php index 4cf1d25..bbb6d77 100644 --- a/appendix_02/SplFixedArray.php +++ b/appendix_02/SplFixedArray.php @@ -27,7 +27,6 @@ $fixedArray[$i] = new stdClass(); } - $start = microtime(true); for($i = 0; $i < $size; $i++) { // do nothing $value = $fixedArray[$i];