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

Cache both head and tail index in both Consumer and Producer (again) #132

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

mgeier
Copy link
Owner

@mgeier mgeier commented Dec 29, 2024

This reverts PR #48.

This may or may not be faster on AMD CPUs.

Performance comparisons in #39 (comment) and #39 (comment) show that rtrb is significantly slower (in the contended case) than the crossbeam PR it is based on (crossbeam-rs/crossbeam#338).

There shouldn't be too many differences between the two code bases, but one of them is #48, so maybe that's the cause for the regression?

It might also be unrelated, though. This PR should only be merged if it shows a clear improvement on AMD CPUs. Ideally, it should have the same performance as (or even better than) crossbeam PR 338.

If this PR doesn't show any improvements on AMD, we'll have to keep looking ...

@mgeier
Copy link
Owner Author

mgeier commented Dec 29, 2024

According to #39 (comment), this indeed significantly improved the performance on an AMD CPU!

I think I will add a comment to the source code (so that the caching isn't removed in the future again), but other than that, it's ready to merge.

@mgeier mgeier marked this pull request as ready for review December 29, 2024 18:19
@mgeier mgeier force-pushed the cache-head-and-tail branch from 951d3d6 to 5d6e900 Compare December 30, 2024 18:11
@mgeier mgeier merged commit 5d6e900 into mgeier:main Dec 30, 2024
9 checks passed
@mgeier mgeier deleted the cache-head-and-tail branch December 30, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant