On 06/10/2016 05:31 PM, Bob Weinand wrote:
Am 10.06.2016 um 16:24 schrieb Levi Morrison <le...@php.net>:

On Fri, Jun 10, 2016 at 6:37 AM, Dmitry Stogov <dmi...@zend.com> wrote:
Hi,


I hardly worked on implementation of this patch for a week, but I still don't 
like it.

It makes 15% slowdown on each property update in existing PHP code (without 
types), and I don't see a way to improve this.

Update of typed properties is going to be even more expensive.

Benchmark results are included into RFC (and not changed with the latest 
version of the patch).


-1.


Thanks. Dmitry.

________________________________
From: Joe Watkins <pthre...@pthreads.org>
Sent: Friday, June 10, 2016 1:38:04 PM
To: PHP internals; Phil Sturgeon
Subject: [PHP-DEV] [RFC][Vote] Typed Properties

Afternoon internals,

    The vote for typed properties has been restarted.

    Please take part: https://wiki.php.net/rfc/typed-properties

Cheers
Joe
To clarify though, didn't Wordpress and Mediawiki see only a 0.1%
slowdown? In my opinion that is definitely a tolerable performance hit
for such a feature.
Right, the 15% are quite skewed … it's in a tight loop which means ideal L1 
cache utilization and the number of executed instructions for a runtime-cached 
ASSIGN_OBJ is very small. Where even 4 additional instructions make significant 
difference.
The current fast-path of ASSIGN_DIM is about 40 instruction, so 15% slowdown comes exactly from this additional 4 instructions and additional memory read.

The 0.1% slowdown of WP and MW are painting a much more realistic (aka real-world) image. 
And as the RFC writes, "may be caused not by the additional checks but by the worse 
CPU cache utilization, because the size of PHP code was increased on 40KB".

Yes, this is my words :)
These micro-benches are really insignificant, especially as it is trivial (in tight loops) to work on a local CV and only assign it later to the property.
they show the effect of the patch on the affected operations, and the shown slowdown is significant. Of course this doesn't affect WP significantly, because the whole ASSIGN_OBJ cost in the app is less than 1%.
So  we slowdown this ~1% on ~15% and got ~0.1% cumulative slowdown.

Thanks. Dmitry.


This IMO is really voting no for the wrong reasons...

Bob


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to