Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99440 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80932 invoked from network); 7 Jun 2017 19:30:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2017 19:30:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.164 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.164 mx208.easyname.com Received: from [212.232.25.164] ([212.232.25.164:53530] helo=mx208.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/98-27119-B3458395 for ; Wed, 07 Jun 2017 15:30:04 -0400 Received: from cable-81-173-132-37.netcologne.de ([81.173.132.37] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dIgeU-0004jD-UM; Wed, 07 Jun 2017 19:30:00 +0000 References: <20170607171502.0E59574D18@mx.zeyos.com> To: php-internals , ben.coutu@zeyos.com, Dmitry Stogov Message-ID: Date: Wed, 7 Jun 2017 21:29:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170607171502.0E59574D18@mx.zeyos.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LG5Ms5Bq6K4jmM00FPCXsS3FoWxs1t9AH" X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] Basic string comparison functions still use old parameter parsing API From: php@fleshgrinder.com (Fleshgrinder) --LG5Ms5Bq6K4jmM00FPCXsS3FoWxs1t9AH Content-Type: multipart/mixed; boundary="jTsFCiw5xMqNFf6uguD1W382ljS5W2XaQ"; protected-headers="v1" From: Fleshgrinder To: php-internals , ben.coutu@zeyos.com, Dmitry Stogov Message-ID: Subject: Re: [PHP-DEV] Basic string comparison functions still use old parameter parsing API References: <20170607171502.0E59574D18@mx.zeyos.com> In-Reply-To: <20170607171502.0E59574D18@mx.zeyos.com> --jTsFCiw5xMqNFf6uguD1W382ljS5W2XaQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/7/2017 7:15 PM, Benjamin Coutu wrote: > Hi Dmitry, >=20 > I just noticed that all basic string comparison functions in > Zend/zend_builtin_functions.c, especially "strcmp", "strncmp", > "strcasecmp", "strncasecmp" still use the old and inefficient > parameter parsing API, unlike similar functions in > ext/standard/string.c such as "substr_compare", "strtok", > "str(i)str", "str(i)pos", "strr(i)pos", "strrchr" that already > consistently use the new efficient macro-based API. >=20 > I think one can consider "str(n)cmp" and "str(n)casecmp", etc. at > least as important as "substr_compare", especially considering that > these are wrappers around very basic functions that often get called > in very hot code or inside tight loops (e.g. sorting). I therefore > recommend changing those 4 functions in Zend/zend_builtin_functions.c > to use ZEND_PARSE_PARAMETERS_* macros for PHP 7.2. >=20 > What do you think? >=20 Help? :) https://github.com/php/php-src/pull/2565 --=20 Richard "Fleshgrinder" Fussenegger --jTsFCiw5xMqNFf6uguD1W382ljS5W2XaQ-- --LG5Ms5Bq6K4jmM00FPCXsS3FoWxs1t9AH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZOFQ0AAoJEOKkKcqFPVVrXfAQAILi9vj1Fe8kkWMbYFWJZv2I fKDGg1urRdSEr6a1PPWYOxz1LEweYlHNXblrYr52DxLE2p+I8b+2rMob5Ay4gvKe GrTfgc+IQ2RbYUr7UxZUW4e0n4UReLMzvoUWZfIROZYZsV3oKlG8uP5ER7QIPmJi x9WW1UJ1zFSj/D8meOm3b6DDGgGb5YtEXf8kUuw9AO33u/068+4He8VPA/sT0SfP wpipn1mGWzW/nujOdg9YkCwcisNV5XtMI/ScaN4e2NdILpekfcUBmXPbzU18I0Pw YnX/nPbUYorQOCkLyeoeCV024BR5godvsTYZsiIpVaXz848/Qc5uG4XwdX561ZNV zT7ZArtg5rtQm2Kl+mc5G/jPTl3DlOhn6AnaChCoULttJ1+grzbHPxYkBEriVB5G GbtsRHmjc/dLTLBU8CW9/ExM3XTvDjxA/c0M9rKDGZINZFu65W1bLIBZ5WAXeaCk 6xaMVJQCrDuyuuXSs4I87lK3Ja8MaQmVYoz7xJGe1ViiRD4Fubtz4lTv/XdbW068 nvHN4FUwFLcG/ztO830EFnZgoLYzLw9BxvH/GcYLrULyVlY0o4WoafUjZ/Ng9X+1 2AdbW31qVMzRCyejSvCCqJ8ODTHyWMu7xdZQZS0L39pgUs3HN7fTBOErVXuDtC95 7tSJbsasXDLCY9fgBloH =sfL6 -----END PGP SIGNATURE----- --LG5Ms5Bq6K4jmM00FPCXsS3FoWxs1t9AH--