Performance difference for multi-thread and multi-process

前端 未结 3 1564
不思量自难忘°
不思量自难忘° 2021-01-04 21:11

A few years ago, in the Windows environment, I did some testing, by letting multiple instances of CPU computation intensive + memory access intensive + I/O access intensive

3条回答
  •  自闭症患者
    2021-01-04 22:06

    I found this is true as well. but I think it has something to do with the scheduling. because if you run it long enough, the multi-processes is just as fast as multi-threads. that number is about 10 seconds. if the algorithm needs to be run for 10 seconds. the multi-processes is as fast as multi-thread. but if it only needs to be run for less than 1 second. multi-processes is much,much faster than multi-thread.

提交回复
热议问题