Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95754 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80346 invoked from network); 7 Sep 2016 15:21:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2016 15:21:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:53588] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/20-06456-B6030D75 for ; Wed, 07 Sep 2016 11:21:16 -0400 Received: from [192.168.2.103] ([79.243.115.246]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MHoWj-1blFA90NB7-003hyL; Wed, 07 Sep 2016 17:21:08 +0200 To: Andrea Faulds , internals@lists.php.net References: Message-ID: <9203225f-3367-6f31-7aa7-2a8ef373c858@gmx.de> Date: Wed, 7 Sep 2016 17:21:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:xkXt0O9mZ+hkiw2SsiE2cBKzf3cv54nv54sGbaDSdtLqW4FJGW/ IrtJmFJcE3u22SHEAV1gHTsjKF1m2JoGOt7t9dZh0TiVlPg0zM/1IClJc3g14BoKxd1SAUl 0IMurKM/YxQLFmSU8IkESILSbGdSy97ouHIfgQkNOccfi7lD5ioxLLBGzfk9byl75Md4TIb NabL94r5i4rK9dKiU9eNA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ro2YU0QYUGE=:W4KZoUQpaCpjGPNu6IyUe5 HxKQRsPzHrMI1NWv97fLQapa9EMze6gR0jlL/aqiI62N83theIJWx/AR+PEg5IcLNv/fuzc/h w0OvBlaV3NTIBdUlmqyUiYCM2y8AkhRLf75hdF98cYSukfpX8nIt+uTdp6ZWhHpBpJsSswDG3 ToPRFmqGz1arWL24z43nHixfZFixDljy1w58ceHY+nxIhUFD3e300pw9X7C3w+azqbdS9m3Ej r0N0YnT0GIM5Bmxj4qVzxnKePh0qXVx7TsypWQL7dIExBsJg/DIRfHC1yU4HrIaskDfsAHKPH 5VX/5bOs+o36M9BexZj0cf794bUblxU0P+AQLYPqOI8+C8FhScm5I2x+bpXTa/dHWo6ThsEep xnBIoDoRbBPe+2//YFwJBcfB015B+pplivKn5fqEA4lg4GAkpbq7fyF1wB8PXsWNyIwKvPphi CLkBkviJKE51hjvEePr1wGD/3sOn7y8+vXhYu7nKXXDH4xLBcbGxDql7ceiImVdMbcRgBhKM0 839CPUMdnJ2S4nVeCZNqbhP+sMbDTyocOKqYjoVNN3Ca6WOUor7hs4D7F4ipeJNE3oW8aRDK1 g92jkyc7GoNLz84vgb43JOPDBmZFb8uSqEWm31J2T/K9seioPI1/4cVlB3vrN/VkGUTHBKQfl 3keFPCzh/eksyiFp0kGI13YWPwcrlv8yo5RF3H3NQ3wRG7Px29m+7/ccb3pNy8nGU8mWYfvno U+CY/fwCRZNaxM6CE9o6j8u2aZ6mEGKiAt3ob7rlPSOCaVwJHEA+OKVZad3ZD7QOL/eN4VpXF 0iQ6Xhy Subject: Re: The death of `#ifndef FAST_ZPP`? From: cmbecker69@gmx.de ("Christoph M. Becker") On 04.05.2016 at 18:11, Andrea Faulds wrote: > Since FAST_ZPP was implemented, many functions in built-in PHP > extensions look like this: > > […] > > That is, they have /two/ sets of parameter processing code: one using > the old API, and one using the new API, with conditional compilation. > This is necessary because it is still possible to turn off FAST_ZPP by > changing the value of the macro. > > However, should that be the case? The FAST_ZPP RFC was approved and PHP > 7.0 was released containing it enabled by default, so it's no longer > just an experimental performance enhancement. It seems to me that the FAST_ZPP macro is not (only) to disable an experimental feature, but rather to be able to reduce the size of the built binaries. I've just checked a `./configure --disable-all`: with FAST_ZPP: 16,651,912 without FAST_ZPP: 16,276,152 That's a difference of 375,760 bytes, but only 2% increase. > Furthermore, I have no > reason to believe that the option to turn off FAST_ZPP is actually used > in practice, though feel free to prove me wrong! Perhaps that is so, because FAST_ZPP can't be turned of via ./configure. > Requiring all usages of FAST_ZPP to be accompanied by a > zend_parse_parameters() fallback creates code bloat. It also creates > hidden, potentially build-breaking bugs, because the code is rarely > built with FAST_ZPP disabled. It's like the old TSRMLS_CC situation. > > Furthermore, for those who would prefer the FAST_ZPP API, it is > inconvenient that they cannot use it exclusively and must also use > zend_parse_parameters(), doubling the effort. Valid points. > So, I would like to ask: would there be any objections to going through > and removing all unnecessary zend_parse_parameters fallbacks, and making > it impossible to disable FAST_ZPP? This would make the two APIs equally > valid. All in all, I think that the benefits of using only one of the parameter parsing APIs per function outweigh the drawbacks, so I'm +1 on the removal of the FAST_ZPP macro. -- Christoph M. Becker