Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93480 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69868 invoked from network); 24 May 2016 09:30:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2016 09:30:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 65.55.169.123 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 65.55.169.123 mail-bl2on0123.outbound.protection.outlook.com Received: from [65.55.169.123] ([65.55.169.123:4272] helo=na01-bl2-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/B5-37212-E4F14475 for ; Tue, 24 May 2016 05:30:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NkLK+p3b0ZXDChewgxLOPzS3Q5Zs4e2PvaDX5lUsTMc=; b=NxqzebDrANNPyrKixE03yB47pCaIYoPtRZbb75pzBq3vt8M6sFeAaf1YHIg907/RRRieH9nHUNgCOTdpIiEhx27DyDOTUEo+xUEcLygRqG4GznVQNSvewAaTb1rUkuWpnBnjIJ0oF6qEE9MJAcQS2za3Dmo9/kg7GOjirpuZSE8= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1783.namprd02.prod.outlook.com (10.163.72.25) with Microsoft SMTP Server (TLS) id 15.1.501.7; Tue, 24 May 2016 09:30:51 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0501.013; Tue, 24 May 2016 09:30:51 +0000 To: Joe Watkins , Bob Weinand CC: PHP internals Thread-Topic: [PHP-DEV] [RFC][Vote] Typed Properties Thread-Index: AQHRsl29xlQFrvOFJkSnB4pG0wOhsp/GNLQWgAAMHICAAAy0gIAABg8AgAGDfq8= Date: Tue, 24 May 2016 09:30:51 +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: pthreads.org; dkim=none (message not signed) header.d=none;pthreads.org; dmarc=none action=none header.from=zend.com; x-originating-ip: [132.245.81.165] x-ms-office365-filtering-correlation-id: 6d36311d-b661-4505-6723-08d383b618bb x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1783;5:ZhcoL9L2ru4cTO0CWBxXL4GCPsmGIpvF9BiCFXgIZAXQbSYZsEen+9B+VSuDxFBxRpwqxTLvK4MoR3vr+TiLc3Z91v4qH7Whi/K0Vh3NUB3E2zFUX398WGfyxdrmiB4U08urQoeJRMMESG0M0lx4lg==;24:+TLC+wi/2oKT+urj7h62vWRSlqjGHmgmkHJjQHvItEp8egem/fU8Mt3nXKThwDixrrL5g66zdOsl89gkWN0QfZar1ZwnHWfgfNhVCGwfOY0=;7:NYVmA9de4xkSi40FiQqG4L9/r/ULHmw3NB8p3lNKqov+XQLwiutefCiNCmWyrC8OyxCy5uBI9xKN7CizRWa7Bgp7aWRjiXFui/ruvUYthy4IHMXX7nm2jE61ysUHoztWspgCQUh5CxpJwBrgOn1MjSbr5Jh9oXKMVnOa5KbE5q+6r66Sre7A+uD9m6sbNBDX x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1783; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:BY2PR0201MB1783;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1783; x-forefront-prvs: 09525C61DB x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(377454003)(24454002)(19580405001)(5003600100002)(93886004)(19617315012)(3280700002)(19580395003)(74316001)(87936001)(2900100001)(11100500001)(5004730100002)(19627405001)(9686002)(2950100001)(4326007)(92566002)(10400500002)(16799955002)(99286002)(3660700001)(77096005)(15975445007)(5002640100001)(5001770100001)(33656002)(19625215002)(50986999)(54356999)(76176999)(2906002)(81166006)(8676002)(1220700001)(586003)(86362001)(8936002)(6116002)(102836003)(3846002)(5008740100001)(106116001)(76576001)(66066001)(189998001)(122556002)(16236675004);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1783;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR0201MB17846FFF0260C1A1077FB1AABF4F0BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2016 09:30:51.0712 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1783 Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB17846FFF0260C1A1077FB1AABF4F0BY2PR0201MB1784_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable After the latest changes the patch became better. From a quick look I see two issues. The following 3 tests are failed (crashed with opcache.protect_memory=3D1) > Test typed properties float widen at runtime [Zend/tests/type_declaration= s/typed_properties_027.phpt] > Test typed properties respect strict types (off) [Zend/tests/type_declara= tions/typed_properties_028.phpt] > Test typed properties unset __get magical magic [Zend/tests/type_declarat= ions/typed_properties_030.phpt] Insignificant white space changes and reformatting should be removed from t= he patch (this would simplify the review). I'll need to take a deeper look once again, after the opcache compatibility= fix. Thanks. Dmitry. ________________________________ From: Joe Watkins Sent: Monday, May 23, 2016 1:16:22 PM To: Julien Pauli Cc: Stanislav Malyshev; Dmitry Stogov; PHP internals; Phil Sturgeon Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties Morning internals, I have improved the performance of the patch a little, here's the resul= ts of a bad run: krakjoe@fiji:/usr/src/php-src$ sapi/cli/php -n prop.php empty_loop 0.064 write_prop1() 0.088 0.025 write_prop2() 0.079 0.016 write_prop3() 0.082 0.018 ------------------------ Total 0.314 There is going to be overhead, not the kind we can't minimize, or justi= fy though. Dmitry has said he'll review, and I'm hoping at least Laruence, Nikita,= and Bob will do the same ... We have many weeks to improve the implementation, I'm not going to merg= e anything that's obviously bad :) Cheers Joe On Mon, May 23, 2016 at 10:54 AM, Julien Pauli > wrote: On Mon, May 23, 2016 at 11:09 AM, Stanislav Malyshev > wrote: > Hi! > >> The performance effect of this implementation is terrible. >> >> Assignment to typed property is 2.3 times slower. >> Assignment to untyped property in a class with typed properties is 1.8 t= imes slower. >> >> See the benchmark >> https://gist.github.com/dstogov/1b678712adeee51665cdd829195bb800 > > This is not good. I wonder why these tests weren't made before the vote > and results wheren't added in the RFC. Should we make it a standard > practice to do so? Having 2x slowdown on each property access sounds > like a bad idea. The question is : * should the vote be an idea-based vote, or integrate the code into the vot= e ? My vote did not integrate the code, but the feature. The idea is that if the RFC passes, then the feature is agreed, and we still have some time to find a better implementation. If we could not find one, then the feature should be abandoned or post-poned until a new patch. If the new patch changes the implementation, then the RFC should be reopened. My thoughts. Julien.Pauli --_000_BY2PR0201MB17846FFF0260C1A1077FB1AABF4F0BY2PR0201MB1784_--