Improve performance of Loop by avoiding unneeded method calls#266
Merged
SimonFrings merged 1 commit intoreactphp:1.xfrom May 5, 2023
Merged
Improve performance of Loop by avoiding unneeded method calls#266SimonFrings merged 1 commit intoreactphp:1.xfrom
Loop by avoiding unneeded method calls#266SimonFrings merged 1 commit intoreactphp:1.xfrom
Conversation
3d28bd1 to
f292a30
Compare
Member
Author
|
Updated to work around all legacy PHP and Windows quirks, the result is a somewhat less compact changeset, but still shows the same performance improvements. One more reason to drop legacy support in upcoming ReactPHP v3 (https://github.com/orgs/reactphp/discussions/481) to simplify this significantly! This is ready for review. |
WyriHaximus
approved these changes
May 5, 2023
Member
WyriHaximus
left a comment
There was a problem hiding this comment.
Not as pretty as we discussed earlier this week, but a good step to improve performance for this 👍
SimonFrings
approved these changes
May 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changeset improves performance of
Loopslightly by avoiding unneeded method calls. Not the most significant improvement, but given the small changeset and how we plan to make the defaultLoopmore prominent in ReactPHP v3, I figured this change makes sense in either case:$ time php examples/91-benchmark-ticks.php 1000000 // old 0.83 // new 0.76Builds on top of #245 and #229
See also https://github.com/orgs/reactphp/discussions/481