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

Make AtomicReferenceFieldUpdater fields static for [better performance](https://shipilev.net/blog/2015/faster-atomic-fu/#:~:text=thrown%20out%20of%20the%20window). #7606

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

copybara-service[bot]
Copy link
Contributor

Make AtomicReferenceFieldUpdater fields static for better performance.

This may eliminate the reason for an Unsafe-based implementation even under Java 8, but we will ideally confirm that with benchmarks before ripping that implementation out. (There's also Android: AtomicReferenceFieldUpdater is available there, but we should look into performance, including under older versions, especially with AFAIK no plans to remove Unsafe there.)

(Also, make a few other tiny edits to the backport copy so that it matches the mainline copy more closely.)

RELNOTES=n/a

…mance](https://shipilev.net/blog/2015/faster-atomic-fu/#:~:text=thrown%20out%20of%20the%20window).

This may eliminate the reason for [an `Unsafe`-based implementation](#6806) even under Java 8, but we will ideally confirm that with benchmarks before ripping that implementation out. (There's also Android: `AtomicReferenceFieldUpdater` is available there, but we should look into performance, including under older versions, especially with AFAIK no plans to remove `Unsafe` there.)

(Also, make a few other tiny edits to the backport copy so that it matches the mainline copy more closely.)

RELNOTES=n/a
PiperOrigin-RevId: 713006636
@copybara-service copybara-service bot merged commit 400af25 into master Jan 7, 2025
3 checks passed
@copybara-service copybara-service bot deleted the test_712965455 branch January 7, 2025 20:45
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