Re: ZTS performance

From: Date: Tue, 25 Mar 2003 08:12:41 +0000
Subject: Re: ZTS performance
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-247@lists.php.net to get a copy of this message
On Mon, Mar 24, 2003 at 11:25:47PM +0200, Andi Gutmans wrote: > At 10:20 PM 3/24/2003 +0100, wmeler@wp-sa.pl wrote: > > > ZTS is *always* going to be slower than non ZTS. > > > >Yes, but it can be faster than it is. PHP doesn't use almost any shared > >resources (compiled regexs?) so why it is so slow ? Thread-safe syscalls > >? I don't think so. > > Hmm, not worth arguing with you if you're so sure you know how PHP doesn't > need any per-thread resources. It does... You didn't understand me (my english isn't perfect and there are lacks in vocabulary). PHP uses almost only per-thread resources - global, but only for thread resources. It doesn't use process-global resources (I found only compiled regex cache) so it doesn't need to synchronize on them. There are no lock-contention problems in PHP. > I'm not sure how __thread works but the TSRM implementation already uses > thread local storage to cache the per-thread objects. Not sure __thread > doesn't do the same. as Sascha said - NPTL is the future for multi-threaded applications - I think there is a need for review of TSRM. Regards, Wojtek

« previous php.internals (#247) next »