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

AtomicNumber classes need getAndAdd intrinsic #264

Closed
alexandru opened this issue Oct 31, 2016 · 0 comments
Closed

AtomicNumber classes need getAndAdd intrinsic #264

alexandru opened this issue Oct 31, 2016 · 0 comments
Assignees
Milestone

Comments

@alexandru
Copy link
Member

alexandru commented Oct 31, 2016

Java 8 uses the XADD instruction when incrementing atomic integers, instead of doing a loop with LOCK CMPXCHG. We can use it too in our implementation by means of Unsafe.getAndAddInt and getAndAddLong.

See for details:

@alexandru alexandru added this to the 2.1.0 milestone Oct 31, 2016
@alexandru alexandru self-assigned this Oct 31, 2016
@alexandru alexandru changed the title AtomicNumber classes need XADD AtomicNumber classes need getAndAdd optimisation Oct 31, 2016
@alexandru alexandru changed the title AtomicNumber classes need getAndAdd optimisation AtomicNumber classes need getAndAdd intrinsic Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant