re: ZTS performance

php.internals

l0t3k

23 years ago
one observation i have is that in certain frequently called routines, TSRMLS_FETCH() is called rather than having the the thread environment passed in. zval_dtor comes immediately to mind (this only affects objects). the other thing that i wonder about is the current practice of macro access to fields of TLS globals, rather than a single fetch of a pointer to the global structure, then dereferencing from there. if you look at at zend_execute.c, you'll see what i mean. this is just an amateur's opinion, since i dont know the cost of macro call involved in such accesses. it just seems to me to be more efficient to incur the overhead once (whatever it is), and deref from there. l0t3k "Wojtek Meler" <wmeler@wp-sa.pl> wrote in message news:20030324135821.E31290@wp-sa.pl...
> Hi! > > Does anyone have any suggestions ? Maybe I should use different thread
library ?

(Marcus Börger)

23 years ago
At 15:07 24.03.2003, l0t3k wrote:
>one observation i have is that in certain frequently called routines, >TSRMLS_FETCH() is called rather than having the the thread environment >passed in. zval_dtor comes immediately to mind (this only affects objects).
I can only agree here. the fetch macro is called unnecessarily often. marcus

Andi Gutmans

23 years ago
At 08:04 PM 3/24/2003 +0100, Marcus Börger wrote:
>At 15:07 24.03.2003, l0t3k wrote: >>one observation i have is that in certain frequently called routines, >>TSRMLS_FETCH() is called rather than having the the thread environment >>passed in. zval_dtor comes immediately to mind (this only affects objects). > >I can only agree here. the fetch macro is called unnecessarily often.
Good that you didn't look at this issue in PHP a year ago before Zeev and I eliminated 90% of them :) Andi