Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:277 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20242 invoked from network); 25 Mar 2003 19:26:00 -0000 Received: from unknown (HELO smtp1.ActiveState.com) (209.17.183.249) by pb1.pair.com with SMTP; 25 Mar 2003 19:26:00 -0000 Received: from smtp3.ActiveState.com (smtp3.ActiveState.com [192.168.3.19]) by smtp1.ActiveState.com (8.12.8/8.12.8) with ESMTP id h2PJPt8M016917; Tue, 25 Mar 2003 11:25:55 -0800 Received: from caraveo.com (leverage.ActiveState.com [192.168.3.203]) by smtp3.ActiveState.com (8.11.6/8.11.6) with ESMTP id h2PJPsB27405; Tue, 25 Mar 2003 11:25:55 -0800 Message-ID: <3E80AD3F.9040401@caraveo.com> Date: Tue, 25 Mar 2003 11:25:51 -0800 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: wmeler@wp-sa.pl CC: Zeev Suraski , internals@lists.php.net References: <3b6af3b7d2.3b7d23b6af@wp-sa.pl> <5.1.0.14.2.20030324214937.04581cf0@localhost> <20030325103759.I31290@wp-sa.pl> In-Reply-To: <20030325103759.I31290@wp-sa.pl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] ZTS performance From: shane@caraveo.com (Shane Caraveo) Wojtek Meler wrote: > On Mon, Mar 24, 2003 at 09:59:36PM -0800, Zeev Suraski wrote: > >>If __thread is any similar to Tls under Windows (which would be my guess), >>then we can't use it directly. We're already using pthread_setspecific so >>we're extremely quick with fetches as it is. As I said, I also doubt very >>much that our performance penalty is solely due to fetches, but mostly >>based on other issues, which __thread will not alter in any way. You're >>more than encouraged to try and implement a __thread based solution in >>place of the pthread_setspecific solution and see if it makes any >>difference. If it does, we can investigate further in that direction and >>see if it's usable. > > > I suppose that __thread is similar to __declspec( thread ). I really don't > know what is faster - using > > __thread / __declspec(thread) struct {..} thread_globals; The reason it is not used in windows is because it does not (or at least at the time thread stuff was started it didn't) work correctly with dynamicaly loaded dll's. This was, at the time, well documented by MS to use TLS to get around the limitations of __declspec(thread). Shane