4 ms·
It is true! If you explicitly synchronize between threads, sure, you can't optimize it in general, but if not, the compiler is well within its rights to cache t
by anematode 7mo ago
It is true! If you explicitly synchronize between threads, sure, you can't optimize it in general, but if not, the compiler is well within its rights to cache the access.
- bjourne 7mo agoSure, if the compiler can prove that the objects are thread-local. But that's not the general case.