-
Notifications
You must be signed in to change notification settings - Fork 89
Conversation
Here are two showcases which demonstrate the optimazations. is_string: array_keys: I ran the PHPBench scripts but I am not sure if the report is necessary for that. Also such optimazations already have been made: |
Run PHPBench scripts to show performance improvement |
The reports overall vary a bit, some are better and some worse. |
Could you replace those |
@Ocramius Yes, I can replace them but this implies that support for PHP < 7 would be dropped. Has this been decided yet? For variadics I will see what I can do. Thanks for the comment. |
@smuggli The plan moving forward is to start pinning major components against PHP 7.1. Source: https://framework.zend.com/blog/2017-06-06-zf-php-7-1.html |
Honestly, I don't find the performance argument very compelling. |
This is generally about internal language optimisations coming up later on:
the engine will optimise more of these, but only if the FQN is used.
…On 5 Jul 2017 10:25, "Stefano Torresi" ***@***.***> wrote:
Honestly, I don't find the performance argument very compelling.
This is a change that would need to be propagated on every component for
consistency, and it would also be appropriate to put a coding standards
rule in place.
Is it all truly worth it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#196 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakNTNanxREU3ivAReYrKtZ8v4dCY-ks5sK0h_gaJpZM4ONS77>
.
|
@MichaelGooden Thanks completely missed that. @stefanotorresi It is not a big gain but still something. For now I just started with ServiceManager to see if changes like that are welcome ;). Haven't made any thoughts on a coding standard rule yet. @Ocramius Just replaced the issets with ?? for now because I am running out of time for today. |
@smuggli This PR should target |
@webimpress Changed it to develop. Thanks! |
commit smuggli/zend-servicemanager@fc81dee is unrelated, and the patch needs to be rebased to get rid of it |
775c5a1
to
2ae8b16
Compare
Those optimizations target improving OPCODES.
Would |
@kynx It does appear to achieve the same outcome: With |
@kynx nice one! |
Cheers @Ocramius ! On a side note I just found out PHPStorm can auto-import from global scope. Nice! |
Here is my sniff to import all used internal functions: I've created PR #198 after applying the sniff on develop branch. Should we do the same with constants? |
I don't think that we use many internal constants except for:
All of the above are usually improved by reducing the operation amount itself, rather than these micro-optimisations... |
@Ocramius Sorry had no time working on that. To keep it simple, I would not do any variadics changes yet. Anything else what should be done before merging? |
@smuggli this is good to go as-is, thanks! |
Those optimizations target improving OPCODES.