Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69923 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85159 invoked from network); 29 Oct 2013 07:45:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2013 07:45:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.212.170 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:33265] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/CC-22054-6876F625 for ; Tue, 29 Oct 2013 02:45:10 -0500 Received: by mail-wi0-f170.google.com with SMTP id ex4so2249087wid.3 for ; Tue, 29 Oct 2013 00:45:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=C4JJWcWwLSxatpUKoE6eNjLrvLxR6Rompvx3X8K+m5s=; b=hkjkF6Ht2+MfZttot+hmiLmq9CzO6oGU+hoh4atXW77z5VjI/aa0gv1d3PRF7eQXNO WtY+M6oO8gD8mpkN9fLz68RcOsKm/aPEeeuWlz7zt2Fa26AF+efajzCwPSppOhJFT11Z a2CM3Zf6Tok4gAS2zWB4eL0y+kStA+H2I7DGRxfGsBjQh7TA6KySJ5AuJ8qbK2bXldld RGCD9HgJN6Annif3YfL6+7j/mP+o7b1V7HGmKh2XO4RHGn2CqF7iXMfX2kCl8gSf/VX/ IFKUGlm7t0M3okI9w+8pq5uSEbZ3NFiNlPPAxU2XB2hccLWcF2yGKjH/lhXvT62bphcW I7CA== X-Gm-Message-State: ALoCoQkG8/SXv7XcsSkEp6KMRetjkGoTw36VlmoBwsMMc/PGTt1wKbEYaejfAbZ09MLlwURlcvZWbKkjX42fNx8OczFB6Hv28rJeiXGxUWJcuDWY4Yq2l2mIDgTd7TSJHqjD5/qCTEV1 MIME-Version: 1.0 X-Received: by 10.194.118.169 with SMTP id kn9mr606925wjb.71.1383032706885; Tue, 29 Oct 2013 00:45:06 -0700 (PDT) Received: by 10.227.214.144 with HTTP; Tue, 29 Oct 2013 00:45:06 -0700 (PDT) In-Reply-To: <7c830ad80d33e82eb5f1553d03a44c6d.squirrel@webmail.klapt.com> References: <63d89379efdd7f2ba0bcf0b62d5025af.squirrel@webmail.klapt.com> <7c830ad80d33e82eb5f1553d03a44c6d.squirrel@webmail.klapt.com> Date: Tue, 29 Oct 2013 11:45:06 +0400 Message-ID: To: Anatol Belski Cc: Pierre Joye , PHP Internals , Andi Gutmans , Zeev Suraski , Xinchen Hui Content-Type: multipart/alternative; boundary=089e011764633504bd04e9dc65b6 Subject: Re: [PHP-DEV] Re: Fix for bug #50333 From: dmitry@zend.com (Dmitry Stogov) --089e011764633504bd04e9dc65b6 Content-Type: text/plain; charset=UTF-8 Hi Anatol, Thank you for update. I'm surprised you don't see speed difference even with ZTS :( I didn't get what you propose to change in virtual_file_ex(). I'll do a more careful patch review later on this week. Thaks. Dmitry. On Mon, Oct 28, 2013 at 10:31 PM, Anatol Belski wrote: > Hi Dmitry, > > On Wed, October 23, 2013 14:55, Dmitry Stogov wrote: > > Hi Anatol, > > > > > > First of all PHP is mainly used as NTS on Linux (LAMP stack) > > It's the reason I tested it first, to check if your patch affects the > > performance that is really important for users. > > > > I still think that tsrm_do_alloca() have to be replaced by do_alloca(). > > They have exactly the same logic, except that the first one fallback to > > malloc() and the second one to emalloc(). It must not be affected by > > malloc()s and realloc()s if you changed them into emalloc() and > > erealloc(). May be I missing something... > > > > > > I'm not sure about alloca() usage on Windows, but you may change zend.h > > if you like. BTW: I don't think we should replace alloca() by _malloca(), > > because do_alloca() already does the same in portable way and uses > > per-request heap. > > > > last week I've updated the patch according to your recommendations, now we > have the performance test results > > > http://windows.php.net/downloads/snaps/ostc/pftt/perf/results-20131025-MasterVanilla-Master50333-3820.html > > http://windows.php.net/downloads/snaps/ostc/pftt/perf/results-20131025-MasterVanilla-Master50333-7795.html > > Also enabled the stack usage in both TS/NTS for windows. It shows still no > improvement as one can see. Though, there are some functions, like > virtual_file_ex(), which use emalloc() only in the patch, but called very > often within the virtual cwd API. Changing them would require signature > changes os one can efree() in case of the fallback situation, but still > it's doubtful that would tell some bigger difference in performance. Do > you think it's worth a try? > > Regards > > Anatol > > --089e011764633504bd04e9dc65b6--