Y
Hacker News
new
|
ask
|
show
|
jobs
by
bjourne
96 days ago
Untrue. Objects and attributes may be shared by threads so attribute accesses can't in general be localized.
1 comments
anematode
95 days 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.
link
bjourne
93 days ago
Sure, if the compiler can prove that the objects are thread-local. But that's not the general case.
link