On 1/20/25 08:24, Peter Veentjer wrote:
The question is the following: assuming that an opaque field is used appropriately, is there any risk in using opaque? Is there any chance that a JVM will go up in flames or start to take over the world.

Generic (scary) answer: With complex optimizing compilers, there is always a risk in using stuff you have not touched before: if intermediate representation of the program changes, it may take compiler to the paths it was not visiting before in the similar conditions.

Specific (non-scary) answer: ...but I would estimate the risk for additional compiler barriers Opaque emits is slim to none. To begin with, the compiler barriers emitted around Opaque are the subset of barriers emitted for Acquire/Release/Volatile accesses already.

-Aleksey

--
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion, visit 
https://groups.google.com/d/msgid/mechanical-sympathy/ba3fb287-1188-4374-8ed7-e526425576c6%40gmail.com.

Reply via email to