Re: Re: Improving speed -> caching hash results in zend_execute?
| From: | Sterling Hughes | Date: | Tue, 19 Mar 2002 02:46:42 +0000 |
| Subject: | Re: Re: Improving speed -> caching hash results in zend_execute? | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-81469@lists.php.net to get a copy of this message | ||
> Does anyone want to comment on this (the full threads on PEAR-DEV),
> about the results (2) and (3), - 2 is a wrapper call to another
> function 3 is directly calling a function/method - I think it was 20,000
> times.... (1) is the original PEARdb call - with some extra ifs...etc.
>
> anyway - the overhead for wrapping the call was quite high..
>
> I had a look at the code in zend_execute.c (in ZE2 & ZE1) - the question
> goes something like this - I'm guessing that it's the hash table lookups
> being repeatedly called causing this slowdown. (couldnt see anything
> else...)
>
> Would it not be an idea to cache in the opcode for the function call the
> result of the last hashtable lookup, then check if that lookup was valid
> first rather than doing a hashtable lookup on each call?
>
> (or am I talking out my ass :)
>
you're talking out your ass :)
-Sterling
* The breakfast of champions is not cereal, it's the opposition. *