4 ms·
> [...] when reading many small packets from a network socket [...] Yeah, I should've said it more carefully. That's what I was hinting at with the mention of
by xscott 5y ago
> [...] when reading many small packets from a network socket [...]
Yeah, I should've said it more carefully. That's what I was hinting at with the mention of Amdahl's law. The separate bits of I/O are done in C extensions which can release the GIL, and those can be done in parallel (with each other and your computation), but if each bit of work is small, the synchronization cost (reacquiring the GIL for each packet) becomes relatively large.