News for hackers. Stuff that matters.
Re:Why has CPU frequency ceased to grow? (2014) by Const-me on Wednesday February 21, 2018 @09:45PM (#16434788)
OMP is only good for CPU bound code. You try to do IO inside OMP parallel section, and you’ll put the whole OS thread to sleep. The OS kernel will likely reschedule some other thread on that hardware thread, but that rescheduling is an expensive process.

Goroutines and .net tasks allow a nice mix of CPU bound and IO bound code. While a goroutine/task is waiting for IO or something else to complete (timer in this example), the runtime will immediately use the hardware thread for some other task, without OS involved.

There are no comments on this comment yet.