Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52932 invoked from network); 6 Mar 2013 22:25:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2013 22:25:25 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.96 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.96 blu0-omc2-s21.blu0.hotmail.com Windows 2000 SP4, XP SP1 Received: from [65.55.111.96] ([65.55.111.96:14294] helo=blu0-omc2-s21.blu0.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/C2-39658-352C7315 for ; Wed, 06 Mar 2013 17:25:23 -0500 Received: from BLU0-SMTP26 ([65.55.111.72]) by blu0-omc2-s21.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 6 Mar 2013 14:25:21 -0800 X-EIP: [gz9vn9kkIyAGFNNMD1oJTs4trHj4q93o] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from bob-weinands-imac.fritz.box ([78.141.134.76]) by BLU0-SMTP26.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 6 Mar 2013 14:25:18 -0800 Content-Type: multipart/alternative; boundary="Apple-Mail=_7BEC94A6-017E-418C-A6D6-0A12227276D1" MIME-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) In-Reply-To: Date: Wed, 6 Mar 2013 23:25:16 +0100 CC: PHP Developers Mailing List References: To: Will Fitch X-Mailer: Apple Mail (2.1499) X-OriginalArrivalTime: 06 Mar 2013 22:25:18.0931 (UTC) FILETIME=[7BD76A30:01CE1AB9] Subject: Re: [PHP-DEV] [RFC] unset(): return bool if the variable has existed From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_7BEC94A6-017E-418C-A6D6-0A12227276D1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Am 6.3.2013 um 22:50 schrieb Will Fitch : > On Wed, Mar 6, 2013 at 4:44 PM, Bob Weinand = wrote: > Am 06.03.2013 um 22:39 schrieb "Will Fitch" : >=20 >> On Wed, Mar 6, 2013 at 4:10 PM, Bob Weinand = wrote: >> Hi! >>=20 >> As this seem to require a RFC, here is it: >>=20 >> https://wiki.php.net/rfc/unset_bool >>=20 >> I'm not a fan of this change, but if it's going to be discussed, the = RFC should include baseline and RFC change benchmarks. =20 >> =20 >>=20 >>=20 >> Please feedback, >>=20 >> Bob Weinand >>=20 >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >=20 > I don't see here a real need for a benchmark as it is mostly only = returning SUCCESS or FAILURE instead of nothing. Nothing what would slow = PHP down. >=20 > Any change to a language construct which requires additional = processing adds time. It may be in minute, but it's part of the = discussion. Since this core change you're requesting comments for = introduces a usecase which many will not find useful (probably most = voting), it is your responsibility to convince this category of people = that the tradeoff won't affect them that much. >=20 > If you choose not to add benchmarking, I will guarantee a -1 from me. > =20 >=20 > Bob Weinand I have tried the following: time ./sapi/cli/php -r 'while($i++ < 1e7) { $a =3D true; unset($a); }' Unpatched: average of 5x executed: real 0m4.935s user 0m4.925s sys 0m0.008s Patched: average of 5x executed: real 0m4.945s user 0m4.938s sys 0m0.005s Yes, there is an increase of 0.15%. This is 1 nanosecond more than = previous. Is this exact enough? Or do you need more precision? If yes, I'll put this into the RFC. Bob Weinand --Apple-Mail=_7BEC94A6-017E-418C-A6D6-0A12227276D1--