Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:235 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92518 invoked from network); 24 Mar 2003 21:31:43 -0000 Received: from unknown (HELO marco.bezeqint.net) (192.115.106.37) by pb1.pair.com with SMTP; 24 Mar 2003 21:31:43 -0000 Received: from mr4.bezeqint.net (pip-18.bezeqint.net [192.115.106.18]) by marco.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP id 970961624 for ; Mon, 24 Mar 2003 23:29:41 +0200 (IST) Received: from mail.zend.com (bzq-117-235-230.cust.bezeqint.net [192.117.235.230]) by mr4.bezeqint.net (Mirapoint Messaging Server MOS 3.3.3-GR) with SMTP id ARU28347; Mon, 24 Mar 2003 23:31:36 +0200 (IST) Received: (qmail 20489 invoked from network); 24 Mar 2003 21:24:47 -0000 Received: from localhost (HELO andi-laptop.zend.com) (127.0.0.1) by localhost with SMTP; 24 Mar 2003 21:24:47 -0000 Message-ID: <5.1.0.14.2.20030324232410.02b876c8@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 24 Mar 2003 23:25:47 +0200 To: wmeler@wp-sa.pl, zeev@zend.com Cc: internals@lists.php.net In-Reply-To: <3b6af3b7d2.3b7d23b6af@wp-sa.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] ZTS performance From: andi@zend.com (Andi Gutmans) References: <3b6af3b7d2.3b7d23b6af@wp-sa.pl> 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... > > There's no need for rewriting TSRM, it's roughly as fast as it can be. > >Things changes ... >Now we have AD2003 and __thread keyword in gcc. I suppose that if we use >it we could get rid of all this TSRMLS*. I know - PHP is not for linux >only - but we could have it in TSRM implementation. >I'm sure that compiler will optimize it better if __thread keyword will >be used instead of TSRMLS*. 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. Andi