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 :)

regards
alan


Tomas V.V.Cox wrote:

>Alan Knowles wrote:
>
>> Thomas - does it make any difference if you add a fast fetch method?
>>Class DB....
>>
>>funcition fastFetchInto(&$arr|,$fetchmode|) {|
>>    return  $this->dbh->fetchInto($this->result, $arr, $fetchmode);|
>>}
>>
>
>It makes some difference yeah, but still not all we would want to get:
>Results:
>1 -> 26.209026 seconds
>2 -> 13.831852 seconds
>3 -> 19.579646 seconds
>
>> 
>>
>
>
>
>Tomas V.V.Cox
>




-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to