Re:Python 3.15's JIT is now back on track
by LtWorf on Wednesday March 18, 2026 @10:19AM
(#47426119)
Another thread can access it and do that, how could the compiler possibly know about it?
There are documented ways to ensure that changes are visible across threads (e.g. locks). If these are not used, the compiler is within its rights to not go out of its way to pull changes from another thread.
Re:Python 3.15's JIT is now back on track
by LtWorf on Wednesday March 18, 2026 @04:58PM
(#47431365)
Except python has a well documented global lock.
If these analyses don't apply and the callee could do anything, then of course the compiler can't keep the value hoisted. But a function call has to occur anyway, so the hoisted value will be pushed/popped from the stack and you might as well reload it from the object's field anyway, rather than waste a stack slot.