协程 相对于 多线程的主要优势?.

 

https://medium.com/@kevalpatel2106/why-should-you-learn-go-f607681fad65

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

调度程序采用称为工作窃取的技术

 

Powered by Jekyll and Theme by solid

本站总访问量