2 ms·
I am sorry, but by memory I meant cache memory that is in fact inside the CPU. This is error on my side. I read [0] and could not infer anything to confirm my
by eveningcoffee 11y ago
I am sorry, but by memory I meant cache memory that is in fact inside the CPU. This is error on my side.
I read [0] and could not infer anything to confirm my understanding, but if we consider the semantics of GIL, then there should be some form of guarantee in place that two CPU cores see the coherent picture of the cache (other way two threads would see incoherent values of the same variable or would not see the changes at all). This is usually archived by some form of memory barriers and flushing the registers into memory and this by my experience (that comes from Java) makes the code order of magnitude or two slower.
[0] https://wiki.python.org/moin/GlobalInterpreterLock https://wiki.python.org/moin/GlobalInterpreterLock