note 46500 deleted from function.array-key-exists by bjori

From: Date: Mon, 01 May 2006 22:30:23 +0000
Subject: note 46500 deleted from function.array-key-exists by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-110310@lists.php.net to get a copy of this message
Note Submitter: nick cope nl ---- array_key_exists() is in some circumstances MUCH slower than isset(). We had a case where a heavily recursive function used array_key_exists() to early exit. It went from 50 to 4 seconds when array_key_exists() was replaced with isset(). The funny thing was that with replacing the first array_key_exists() the benefit was 25% while the benefit with the second one was a factor of 20. The timing includes the generation of the graph with jpgraph and some other work.

« previous php.notes (#110310) next »