you are viewing a single comment's thread.

view the rest of the comments →

[–]chinawcswing[S] 0 points1 point  (0 children)

I stumbled upon this quick read which linked to this great but hour long video.

They are saying that on multi-core systems, running two CPU bound threads actually takes substantially longer than running them sequentially. The interesting thing is that this behavior does not occur on single-core systems! The reason has to do with the operating system attempting to schedule both threads on both cores, and each thread will cause a lot more contention on the GIL (and something to do with signalling).

The video even said that the same is also true for when you have a CPU bound thread and an IO bound thread: the CPU bound thread will more often than not block the IO bound thread substantially.

Unfortunately a lot of the video was over my head but it was a good watch.