Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] Re: ZEND_ACC_* flags

Posted by Stanislav Malyshev 
Stanislav Malyshev
[PHP-DEV] Re: ZEND_ACC_* flags
July 25, 2018 08:40PM
Hi!

> I tried to  fix ZEND_ACC_* flags mess.
>
>
> https://gist.github.com/dstogov/3b6ae377c17524b219670960cf98f8c1
>
>
> The patch specifies flags meaning, and reorder them according to meaning
> and frequency of usage (this allows generation of shorter instructions
> on x86).
>
> Unfortunately, the patch breaks few reflection based tests that relay on
> binary modifiers values.

I am not sure I understand what the effect is here - does it allow any
measurable improvement? If not, I'd wait until the after the branch. But
I could change my mind if there's real performance gain...

The test part, however, which replaces bits with constants, I think is
good anytime, I don't think we should have been using bit values anyway.

--
Stas Malyshev
smalyshev@gmail.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Dmitry Stogov
[PHP-DEV] Re: ZEND_ACC_* flags
July 25, 2018 10:20PM
OK. I'll keep this for next PHP version.

There is no any performance improvement (just a bit smaller code).


The patch clarifies the meaning of all the flags, what entities use them, and points what some of them may be eliminated completely.


Thanks. Dmitry.

________________________________
From: Stanislav Malyshev <[email protected]>
Sent: Wednesday, July 25, 2018 9:35:11 PM
To: Dmitry Stogov; Christoph M. Becker; PHP internals list
Cc: Nikita Popov
Subject: Re: ZEND_ACC_* flags

Hi!

> I tried to fix ZEND_ACC_* flags mess.
>
>
> https://gist.github.com/dstogov/3b6ae377c17524b219670960cf98f8c1
>
>
> The patch specifies flags meaning, and reorder them according to meaning
> and frequency of usage (this allows generation of shorter instructions
> on x86).
>
> Unfortunately, the patch breaks few reflection based tests that relay on
> binary modifiers values.

I am not sure I understand what the effect is here - does it allow any
measurable improvement? If not, I'd wait until the after the branch. But
I could change my mind if there's real performance gain...

The test part, however, which replaces bits with constants, I think is
good anytime, I don't think we should have been using bit values anyway.

--
Stas Malyshev
smalyshev@gmail.com
Sorry, only registered users may post in this forum.

Click here to login