Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52495 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18589 invoked from network); 21 May 2011 20:40:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 May 2011 20:40:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.123 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.123 smtp123.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.123] ([67.192.241.123:51299] helo=smtp123.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/FD-41792-23328DD4 for ; Sat, 21 May 2011 16:40:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp22.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id B1984170403; Sat, 21 May 2011 16:40:15 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp22.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 277BF1702D8; Sat, 21 May 2011 16:40:14 -0400 (EDT) Message-ID: <4DD8232E.3090207@sugarcrm.com> Date: Sat, 21 May 2011 13:40:14 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Martynas Venckus CC: Sebastian Bergmann , "internals@lists.php.net" References: <4DD63451.10408@zend.com> <4DD748A0.9020004@php.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] arithmetic speedup From: smalyshev@sugarcrm.com (Stas Malyshev) 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. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227