> That's one of the reasons, I would guess. The libc memory manager is not > very efficient with multiple threads accessing it at once, it has locks > (which is one of the reasons we implemented our own in ZE2). It's > definitely one of the reasons, and as you know, performance penalties > accumulate.
Which libc are you referring to here?
All, basically. Even the ultra optimized Windows memory manager is inefficient when it comes to simultaneous allocations in multiple threads, when compared to having different heaps for different threads.
Today's Linuxthreads implementation uses a very simple mechanism to maintain TLS (calculating an object's address in software) whereas NPTL will shift this work to the processor's MMU. I expect a big win for PHP's thread-safe mode.
That's what Windows TLS does, IIRC.
This positive effect will be automatically achieved by continuing our use of POSIX APIs.
No surprise there...
Zeev
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php