note 55928 added to function.array-key-exists

From: Date: Thu, 18 Aug 2005 02:58:15 +0000
Subject: note 55928 added to function.array-key-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-93817@lists.php.net to get a copy of this message
Wow. Substituting isset() makes a huge difference in performace for our application. I am too lazy to put together an actual benchmark but it has to be a near a 10 fold decrease in execution time! The only thing that I can gather is that Tim's benchmark does not acurately reflect execution time of of the individual functions, only of the program in its entirety (load up, execution, and termination). It also possible (as foxyshadis's note noted) that the Tim's above example might just be hitting cache for $a[333] repetitevly. Maybe this just an optimization of php in the version he is using? If the example of Tim hit random value for the subscript of $a, it might yeild more accurate performance rating. ---- Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55928 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55928&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55928&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55928&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55928&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55928&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55928&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55928&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93817) next »