マルチスレッドに対するコヒーレンスの主な利点は?
1664 ワード
https://medium.com/@kevalpatel2106/why-should-you-learn-go-f607681fad65
Creation (thread: 18 microseconds, fiber: 0.45 microseconds)
https://medium.com/software-design/boost-fiber-in-your-code-9dcdda70ca00
Table 1.1. time per actor/erlang process/goroutine (other languages) (average over 1,000,000)
Haskell | stack-1.4.0
Go | go1.8
Erlang | erts-8.3
0.05 µs - 0.06 µs
0.45 µs - 0.52 µs
0.63 µs - 0.73 µs
Table 1.2. time per thread (average over *10,000* - unable to spawn 1,000,000 threads)
pthread
std::thread
54 µs - 73 µs
52 µs - 73 µs
Table 1.3. time per fiber (average over 1.000.000)
fiber (16C/32T, work stealing, tcmalloc)
fiber (1C/1T, round robin, tcmalloc)
0.05 µs - 0.11 µs
1.69 µs - 1.79 µs
https://www.boost.org/doc/libs/1_64_0/libs/fiber/doc/html/fiber/performance.html
その他:私が推測した
スレッドプールの主な利点は?
tbb flow graph how to schedule tasks
from https://software.intel.com/en-us/node/506295
スケジューラは作業盗みと呼ばれる技術を採用する
転載先:https://www.cnblogs.com/cutepig/p/11253625.html