Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52473 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73688 invoked from network); 20 May 2011 10:05:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 May 2011 10:05:29 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:32810] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/21-01014-8EC36DD4 for ; Fri, 20 May 2011 06:05:29 -0400 Received: by eyf5 with SMTP id 5so1164800eyf.29 for ; Fri, 20 May 2011 03:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4rI2TOA/C+WzgtXuBFxTcdXbXwyKV8QZX8iKh+enShw=; b=dBu+uV0EDZkx3/X8YBY1iWhWpdMHetZAHtpMRlsuB5Fo2/dQjDw1GVYo0syA0WURHF 5g15YMkjgyw3l5k1O/E7C+gmr2E/AREv4T9YOcd/nnwABASzmAhH0e2CbWbP4+Ig71jt f2VXTsP4e5A4cRwbfya2Ltu0WeODDxudB7Kjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Z33OY2mK61If+FeVYB+NGSB8hgVhWe1Ru/5gFNRq5nWNVi2VPk2D/YQHuVyPptar2I ZQmA/hRA/rOkXXNeSpd+LZWD7PluW9jJioJc3x9TaMIJjgmiE2yFAZulysC5zjuUg2CB womUdIg/y885PYPTKoDlVAGxSmw/2jpyzTw0w= MIME-Version: 1.0 Received: by 10.14.5.195 with SMTP id 43mr1538465eel.127.1305885925644; Fri, 20 May 2011 03:05:25 -0700 (PDT) Received: by 10.14.127.80 with HTTP; Fri, 20 May 2011 03:05:25 -0700 (PDT) In-Reply-To: <4DD63C03.3090401@zend.com> References: <4DD63451.10408@zend.com> <4DD63C03.3090401@zend.com> Date: Fri, 20 May 2011 12:05:25 +0200 Message-ID: To: Dmitry Stogov Cc: PHP Internals , Stas Malyshev , Andi Gutmans Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [PATCH] arithmetic speedup From: pierre.php@gmail.com (Pierre Joye) On Fri, May 20, 2011 at 12:01 PM, Dmitry Stogov wrote: > 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. As this patch is only GCC (and linux I suppose), I would suggest to simply commit in trunk right now. Other platforms can implement it later (I will do it for windows in the next weeks). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org