Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alg: Push tasks directly to the local runner, take 2 #37

Merged
merged 4 commits into from
Jul 2, 2023

Conversation

notgull
Copy link
Member

@notgull notgull commented Mar 10, 2023

This PR supersedes #36 by pushing tasks directly to the local runner. A thread-local variable is used to cache a reference to the current Runner which is then used by schedule() to push tasks directly to the local queue.

This has led to significant improvements in some of our benchmarks! Around 10% in the main use cases, and 77% in the yield now case.

image

Copy link
Member

@zeenix zeenix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and really happy for such a huge performance improvement! Thanks for doing this.

@notgull notgull merged commit 9df3dd4 into master Jul 2, 2023
@notgull notgull deleted the notgull/cached-task-2 branch July 2, 2023 18:29
@notgull notgull mentioned this pull request Aug 19, 2023
notgull added a commit that referenced this pull request Aug 20, 2023
This commit makes sure that the run() and tick() functions produce
futures that are Send and Sync, to prevent a regression introduced in

Signed-off-by: John Nunley <[email protected]>
#37. Tests are also added to prevent this regression in the future.
notgull added a commit that referenced this pull request Aug 20, 2023
This commit makes sure that the run() and tick() functions produce
futures that are Send and Sync, to prevent a regression introduced in
PR #37. Tests are also added to prevent this regression in the future.

Signed-off-by: John Nunley <[email protected]>
notgull added a commit that referenced this pull request Aug 21, 2023
This commit makes sure that the run() and tick() functions produce
futures that are Send and Sync, to prevent a regression introduced in
PR #37. Tests are also added to prevent this regression in the future.

Signed-off-by: John Nunley <[email protected]>
notgull added a commit that referenced this pull request Oct 17, 2023
This was added in #37 as an optimization, but has since lead to many bugs. See
the issues #53, #57 and #60 for more information. I do not have the bandwidth
to address all of these bugs, so I'm taking the path of least resistance by
just removing the problematic code.

CLoses #53, #57 and #60

Signed-off-by: John Nunley <[email protected]>
notgull added a commit that referenced this pull request Oct 17, 2023
This was added in #37 as an optimization, but has since lead to many bugs. See
the issues #53, #57 and #60 for more information. I do not have the bandwidth
to address all of these bugs, so I'm taking the path of least resistance by
just removing the problematic code.

CLoses #53, #57 and #60

Signed-off-by: John Nunley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants