Justin Cormack wrote: > Does LuaJIT respect volatile semantics in terms of (not) optimising it? No, but that's an orthogonal issue to the original question. ['volatile' is rather complex to implement correctly and the weak guarantees are pretty useless on a modern CPU. Memory barriers and optimization barriers are conceptually much cleaner. The latter are already implemented internally (XBAR), but there's no API to emit them explicitly. But then ... nobody asked for those, yet.] --Mike