Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52472 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72219 invoked from network); 20 May 2011 10:01:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 May 2011 10:01:46 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.199.177.89 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.199.177.89 il-mr1.zend.com Received: from [212.199.177.89] ([212.199.177.89:45995] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/D0-01014-80C36DD4 for ; Fri, 20 May 2011 06:01:45 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.22]) by il-mr1.zend.com (Postfix) with ESMTP id BD3A1606CC; Fri, 20 May 2011 13:00:40 +0300 (IDT) Received: from ws.home (10.1.10.43) by il-ex2.zend.net (10.1.1.22) with Microsoft SMTP Server id 14.1.255.0; Fri, 20 May 2011 13:00:45 +0300 Message-ID: <4DD63C03.3090401@zend.com> Date: Fri, 20 May 2011 14:01:39 +0400 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Pierre Joye CC: PHP Internals , Stas Malyshev , Andi Gutmans References: <4DD63451.10408@zend.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.1.10.43] Subject: Re: [PHP-DEV] [PATCH] arithmetic speedup From: dmitry@zend.com (Dmitry Stogov) Hi Pierre, On 05/20/2011 01:49 PM, Pierre Joye wrote: > hi Dmitry, > > Nice improvements, thanks :) > > Any reason not to have done the changes for windows as well? Sorry, I'm not an expert in MS VC inline assembler. As I remember in VC6 it was poor and didn't allow complicated things. In case someone can add support for VC it would be great. > What's about putting the asm code in external file so it can used by > more compilers? (some has issues with inline asm, like VC in x64 mode, > other may have as well afair). The main idea of the patch is inlining and I don't know how can I inline from external file. In simple cases the function call, parameter passing, prologue, epilogue make more overhead than the opration itself. So the inlining is responsable for 90% of speedup while asm optimization only for 10%. Thanks. Dmitry. > > Cheers, > > On Fri, May 20, 2011 at 11:28 AM, Dmitry Stogov wrote: >> Hi, >> >> The attached patch improves speed of numeric operations by inlining the most >> probable paths directy into executor. It also optimizes some operations for >> x86 CPU using assembler. >> >> The bench.php gets more than 10% speedup (2.5 sec instead of 2.9 sec) >> Real-life applications are not affected. All the PHPT tests are passed. >> >> I'm going to commit the patch on next week if no objections. >> Any related ideas are welcome. >> >> Thanks. Dmitry. >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > >