note 72331 added to function.microtime

From: Date: Sun, 14 Jan 2007 15:51:35 +0000
Subject: note 72331 added to function.microtime
Groups: php.notes 
Request: Send a blank email to php-notes+get-121627@lists.php.net to get a copy of this message
heavyraptor, Optimization should consider two things: 1. The order in which the functions are called (due to load time, and processor prefetch) 2. The number of tests involved (10 is not enough) I would try the test with 10,000 iterations and once with function 1 called first and once with function 2 called first. If possible, try not to store results in an array (since this step will get slower as time passes), but rather process them inline. This can be done by storing the min and max time difference between the two functions then comparing and overwriting if the current value is smaller/larger. Also consider an average difference by adding the current time difference each time then dividing by the number of iterations. This will give you a more accurate picture of the true speed benefit. ---- Server IP: 216.235.15.211 Probable Submitter: 142.46.57.113 ---- Manual Page -- http://www.php.net/manual/en/function.microtime.php Edit -- https://master.php.net/note/edit/72331 Del: integrated -- https://master.php.net/note/delete/72331/integrated Del: useless -- https://master.php.net/note/delete/72331/useless Del: bad code -- https://master.php.net/note/delete/72331/bad+code Del: spam -- https://master.php.net/note/delete/72331/spam Del: non-english -- https://master.php.net/note/delete/72331/non-english Del: in docs -- https://master.php.net/note/delete/72331/in+docs Del: other reasons-- https://master.php.net/note/delete/72331 Reject -- https://master.php.net/note/reject/72331 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121627) next »