Re: RFR 10 JDK-8159995: Rename internal Unsafe.compare methods

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: RFR 10 JDK-8159995: Rename internal Unsafe.compare methods

Andrew Haley
On 08/05/17 22:43, Paul Sandoz wrote:

>> Given any "swap(exp, new)" function can be implemented as
>> "exchange(exp, new) == exp" I'm not sure why we have two complete
>> sets of functions all the way through. But I guess that is a
>> different issue. :)
>
> Yes, it might be possible after some careful performance analysis
> (we might run into some subtle issues).

They don't quite generate the same code, and there is no way to write
an "Exchange" version of a weak "Swap".

Andrew.