3 ms·
How it knows how many cores CPU have?
by garaetjjte 10y ago
How it knows how many cores CPU have?
- debugish 10y agonavigator.hardwareConcurrency
- Klathmon 10y agoand if that's not supported but web workers are, you can guess that information pretty damn accurately by doing work in an increasing number of threads and looking for where you stop seeing little-to-no slowdown.
- SCdF 10y agoNote that it's how many threads, not cores. I have a this CPU: http://ark.intel.com/products/84985/Intel-Core-i5-5257U-Processor-3M-Cache-up-to-3_10-GHz http://ark.intel.com/products/84985/Intel-Core-i5-5257U-Proc... which the websites believes is 4 cores when really it's 2.
- bpicolo 10y agoIt's logical cores vs physical cores.