note 75685 added to function.array-key-exists

From: Date: Mon, 11 Jun 2007 20:14:17 +0000
Subject: note 75685 added to function.array-key-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-127402@lists.php.net to get a copy of this message
Just wondered why array_key_exists() makes me a cpu-load of 85% while isset() only needs 35%. Not a big thing for one time execution, but in my case it have to check 1-dimensional array with ~ 15.000 entries 100 times a second. My code checks a big array for existing entrys and updates them, if needed. Hopes it helps somebody. Notice that on many other functions, which makes coding more comfortable at the cost of speed. ---- Server IP: 217.13.201.10 Probable Submitter: 85.177.2.1 ---- Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php Edit -- https://master.php.net/note/edit/75685 Del: integrated -- https://master.php.net/note/delete/75685/integrated Del: useless -- https://master.php.net/note/delete/75685/useless Del: bad code -- https://master.php.net/note/delete/75685/bad+code Del: spam -- https://master.php.net/note/delete/75685/spam Del: non-english -- https://master.php.net/note/delete/75685/non-english Del: in docs -- https://master.php.net/note/delete/75685/in+docs Del: other reasons-- https://master.php.net/note/delete/75685 Reject -- https://master.php.net/note/reject/75685 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127402) next »