Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77060 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36109 invoked from network); 5 Sep 2014 02:01:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2014 02:01:41 -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 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:57894] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/00-35932-48919045 for ; Thu, 04 Sep 2014 22:01:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp9.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 1689F38091E; Thu, 4 Sep 2014 21:55:52 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp9.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 8C3B8380E62; Thu, 4 Sep 2014 21:55:51 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.10); Fri, 05 Sep 2014 01:55:52 GMT Message-ID: <54091826.6050602@sugarcrm.com> Date: Thu, 04 Sep 2014 18:55:50 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Pierre Joye , Dmitry Stogov CC: Bob Weinand , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Fast zend_parse_parameters API From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > As I understand correctly the only reason we have this discussion is > the performance impact of zpp with some functions, mainly > ZEND_FUNCTIONs. What prevents us to make them operators? That may > break things like call_user_func("strlen", $arg), array_map and the There's also an issue that strlen("foo") may mean a different thing if you're in a namespace. So there may be a challenge to do this on compiler level, at least in the obvious way. But maybe there's a way around it, so theoretically we could make compiler treat strlen() as operator, or, more precisely, as an inline function looking like C function with parameters passed in registers. I.e., what I mean is skipping the whole parameter-passing and receiving altogether and just give it the slot where the variable lives. Of course, it would work only with strlen() and such which do not modify the argument and hardly do anything with it at all, and strlen would essentially have to have two implementations - one for "inline" usage and one for "normal" usage ($foo(), call_user_func(), etc.). But since 99% of actual usage would be "inline" it may still be beneficial. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/