[Python-ideas] An alternate approach to async IO

Sturla Molden sturla at molden.no
Wed Nov 28 13:10:42 CET 2012

Den 28. nov. 2012 kl. 06:20 skrev Greg Ewing <greg.ewing at canterbury.ac.nz>:

> Trent Nelson wrote:
>>    When you're dealing with that sort of load
>>    on a many-core machine (let's say 16+ cores), an interlocked list
>>    is going to reduce latency versus 16+ threads constantly vying for
>>    the GIL.
> I don't understand. Why is vying for access to an interlocked
> list any less latentful than vying for the GIL?

Because ensuring and releasing GIL is more expensive than an atomic read/write.

And because the thread running Python would go to sleep while an IOCP thread is active, and perhaps be moved out of CPU cache.


More information about the Python-ideas mailing list