News for hackers. Stuff that matters.
Re:CPU core estimation with JavaScript by eboyjr on Friday May 24, 2013 @08:18AM (#5762261)
I 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.ht...

Re:CPU core estimation with JavaScript by 1gn1t10n on Friday May 24, 2013 @08:24AM (#5762282)
That's exactly what a threading library abstraction aims to do. For example the Intel TBB (Threading Building Blocks).