Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24058 invoked from network); 21 May 2011 21:25:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 May 2011 21:25:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=martynas@venck.us; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=martynas@venck.us; sender-id=unknown Received-SPF: error (pb1.pair.com: domain venck.us from 209.85.213.170 cause and error) X-PHP-List-Original-Sender: martynas@venck.us X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:60244] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/50-19712-EBD28DD4 for ; Sat, 21 May 2011 17:25:20 -0400 Received: by yxi11 with SMTP id 11so1917459yxi.29 for ; Sat, 21 May 2011 14:25:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.77.39 with SMTP id c27mr977295yhe.209.1306013116336; Sat, 21 May 2011 14:25:16 -0700 (PDT) Received: by 10.147.40.10 with HTTP; Sat, 21 May 2011 14:25:16 -0700 (PDT) X-Originating-IP: [88.118.0.226] In-Reply-To: <4DD8232E.3090207@sugarcrm.com> References: <4DD63451.10408@zend.com> <4DD748A0.9020004@php.net> <4DD8232E.3090207@sugarcrm.com> Date: Sun, 22 May 2011 00:25:16 +0300 Message-ID: To: Stas Malyshev Cc: Sebastian Bergmann , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [PATCH] arithmetic speedup From: martynas@venck.us (Martynas Venckus) On 5/21/11, Stas Malyshev wrote: > Hi! > >> What platform was that on? GCC already inlines its builtins by >> default (even at -O0). I.e., the abs() generates the following code: > > As I understand, Sebastian wasn't talking about inlining C abs(). He was > talking about converting PHP abs() (which is a function call right now > with all overhead that this implies) to an opcode, which makes it > somewhat cheaper to call, since the engine will be handling it without > the overhead associated with PHP function call. That probably makes sense. The original diff had optimizations using x86 assembler; this mislead me. (-;