Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102915 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46256 invoked from network); 19 Jul 2018 11:33:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2018 11:33:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 104.47.33.130 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.33.130 mail-bn3nam01on0130.outbound.protection.outlook.com Received: from [104.47.33.130] ([104.47.33.130:20288] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/8A-37178-EF6705B5 for ; Thu, 19 Jul 2018 07:33:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hiP9qdpacysXbnUBWxyiuL3nZVX5XQ/r2FG0WoWfEJY=; b=NoOkvzfN1SKikwtzUY8tNcKT6ZT1VoHS52nwGWdklHpPMUhTbZXv+Vg/SyjG39mZYSYRS9zsVp+RVTI/MNwFW6wWqsKKD6uuxWyuhviuRoR3TXtE1HqtL7RhLG69OCb/qs/yXk1NM53icdROBRLJPKIDOlQE2Kv60g2hsVF8YHE= Received: from BY1PR02MB1260.namprd02.prod.outlook.com (10.162.109.14) by BY1PR02MB1210.namprd02.prod.outlook.com (10.162.108.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.20; Thu, 19 Jul 2018 11:33:13 +0000 Received: from BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::b92b:7a03:8754:ed4]) by BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::b92b:7a03:8754:ed4%5]) with mapi id 15.20.0952.021; Thu, 19 Jul 2018 11:33:08 +0000 To: Zeev Suraski , Nikita Popov CC: Zeev Suraski , Internals Thread-Topic: [PHP-DEV] Re: [RFC] Typed Properties Thread-Index: AQHUHT2gcpsR0kfTKkGYW25pPRMBNaSSaTaAgAFM2YCAAoskgIAAKreP Date: Thu, 19 Jul 2018 11:33:08 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [188.170.83.14] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR02MB1210;7:bWD3DyW9D3PZniOMNbyn+RtlI6mqhFSNttEsEFPwxX3Xh81jGWdWRSTjHA7Rjdf28S+yaFwYNcBjGtdMm7nUzZhBdXZn/yF2mhl4F1drYKLWFbDp7a1jtGhnMkqIl8W1aXJ8jEQiClxxQVJcxJQsaouFrLMoO9CyU8cxpuR3qQBRBmG+twfME5PZV/3qhuAYDC6wcxDKWF14/984koepmt8Lont1z35lmY+66RkHAEYnoXCSLJnIsbC10cxyb6rA x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(346002)(136003)(39850400004)(396003)(366004)(376002)(189003)(199004)(606006)(316002)(256004)(53936002)(14454004)(9686003)(236005)(6246003)(6306002)(2900100001)(8676002)(561944003)(186003)(54896002)(26005)(81156014)(93886005)(6436002)(5660300001)(99286004)(7736002)(55016002)(81166006)(8936002)(33656002)(105586002)(14444005)(106356001)(229853002)(7696005)(966005)(97736004)(4326008)(6506007)(486006)(39060400002)(446003)(575784001)(476003)(5250100002)(66066001)(2906002)(478600001)(53546011)(86362001)(76176011)(54906003)(19627405001)(74316002)(110136005)(11346002)(3846002)(102836004)(6116002)(68736007)(25786009)(6606003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1210;H:BY1PR02MB1260.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-office365-filtering-correlation-id: 05799c6b-d89c-45ba-a279-08d5ed6b6700 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600053)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR02MB1210; x-ms-traffictypediagnostic: BY1PR02MB1210: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820)(85827821059158)(192278398808882); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:BY1PR02MB1210;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1210; x-forefront-prvs: 0738AF4208 received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: amICfE8S1Jxc01Pn7KiW5HQOcXNcVpl/4kViHf4uGIE65MhIfx+cWrzDf5VvzHzeK7UAmFht94hyhm19tbak4A01YcRDP1csscPLkl9Genu5HxW411XTSt2vPMPUQ+v3cELUzUCd6KVyeF5kRU7UpkBX1MWD6xfVuBkXF6KAFzw7NzjDhQ6wa+rMiheXEaCYYIk4aH5j4txDpRkFuMX0c5GJqo2qlQebNr23XWrYQiVC1Tq6drD/Bm4U0L8ervNP0YmTZ6YfnjuJvf3ogtuCbyCllOhy3UIc+SsHGN7zVcCyxgJg7CYw1ILMNM50KQKd9bLMzFBNuIBdBzW5tXqhRYDQR97I3iHPmMicJkvzgxI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY1PR02MB126021361704BA68D5F143A7BF520BY1PR02MB1260namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05799c6b-d89c-45ba-a279-08d5ed6b6700 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2018 11:33:08.6900 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1210 Subject: Re: [PHP-DEV] Re: [RFC] Typed Properties From: dmitry@zend.com (Dmitry Stogov) --_000_BY1PR02MB126021361704BA68D5F143A7BF520BY1PR02MB1260namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I've run few benchmarks, to measure the performance penalty of this proposa= l. https://gist.github.com/dstogov/b9fc0fdccfb8bf7bae121ce3d3ff1db1 In most cases real-life apps become ~1% slower. In the worst case, I got 6%= slowdown (on mediawiki). Thanks. Dmitry. ________________________________ From: Zeev Suraski Sent: Thursday, July 19, 2018 11:52:37 AM To: Nikita Popov Cc: Zeev Suraski; Internals Subject: Re: [PHP-DEV] Re: [RFC] Typed Properties On Tue, Jul 17, 2018 at 9:02 PM Nikita Popov wrote: > > Sure, we can wait another week. Unless the additional discussion results = in > major changes to the RFC, we'll start voting next Monday (2018-07-23). In > the interest of avoiding further delays, please try to view this as a har= d > deadline: If you would like to discuss some aspect of the proposal or rai= se > a concern, please do so now rather than on Monday morning. > I reviewed the proposal in detail - and quite detailed it is. It seems like you and Bob did a very thorough job here, kudos on that. I do have 3 comments - none of them major - but I think should be addressed nonetheless: 1. The RFC is surprisingly sparse on examples where the typed properties are not scalar ones. So much, in fact, that I had to check whether this is intentional (i.e., classes are unsupported as enforced property types) or an oversight. Reviewing the 'Supported Types' section, while mentioning a ClassOrInterface - isn't entirely clear, as it's unclear whether this is a token, or something that stands for any class name or interface. Thankfully the proposal does cover class and interface names as property type definitions. I would recommend to be explicit here, and say "any class or interface name", and ideally also provide a sample of that option in the Introduction section of the RFC. 2. While trying to understand whether #1 was in fact supported and reviewing the patch, I noticed that there were several comments from Dmitry on the patch (within the pull request). It would be nice if they were addressed (none of them will turn the patch upside down, and as I see it they are orthogonal to the vote). 3. The patch does bring a performance penalty, albeit quite small (every property assignment now has to conduct type safety checks). This does not only affect code that uses typed properties - but also code that doesn't. I think this should be mentioned in the RFC. To be clear - I don't think the penalty is substantial enough to change someone's opinion about the merits of the proposal one way or another - but in the spirit of full disclosure it should be there. Zeev --_000_BY1PR02MB126021361704BA68D5F143A7BF520BY1PR02MB1260namp_--