4 ms·
I don't think the number of cores is really useful for determining the number of web workers to run in parallel. If you want to push for something, push for a
by ah- 13y ago
I don't think the number of cores is really useful for determining the number of web workers to run in parallel.
If you want to push for something, push for a mechanism that frees you from having to set the number of workers to spawn.
- eboyjr 13y agoI did find this interesting piece of information. > In a compute-bound application running on an N-processor machine, adding additional threads may improve throughput as the number of threads approaches N, but adding additional threads beyond N will do no good. Indeed, too many threads will even degrade performance because of the additional context switching overhead. The optimum size of a thread pool depends on the number of processors available and the nature of the tasks on the work queue. On an N-processor system for a work queue that will hold entirely compute-bound tasks, you will generally achieve maximum CPU utilization with a thread pool of N or N+1 threads. From http://www.ibm.com/developerworks/library/j-jtp0730/index.html http://www.ibm.com/developerworks/library/j-jtp0730/index.ht...
- 1gn1t10n 13y agoThat's exactly what a threading library abstraction aims to do. For example the Intel TBB (Threading Building Blocks).