Re: [whatwg] Proposal: navigator.cores

On Mon, May 5, 2014 at 6:45 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 5/4/14, 9:49 AM, Adam Barth wrote:
>
>> Maybe navigator.hardwareConcurrency as a nod to the C++11 name?
>>
>
> What is the proposed behavior of this attribute on AMP (as opposed to SMP)
> systems?  Note that some of these are shipping in actual devices today, and
> I expect that to continue.


>From the proposal wiki page:

"On getting, the cores property should return the number of logical
processors available to the user agent. For example on OS X this should be
equivalent to running sysctl -n hw.ncpu."

Eli clarified further in <
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2014-May/254202.html>:

---8<---
The proposal specifically states using logical cores, which handles
all of the CPUs you mentioned properly.

Intel CPUs with hyperthreading enabled report logical cores as double
the hardware cores. Depending on the version and configuration of the
Samsung Exynos Octa big.LITTLE CPUs, you will get either 4 logical
cores (only one cluster can run at a time) or 8 logical cores
(big.LITTLE MP, available in Exynos 5420 or later only).
--->8---

I'm sure there's more precise language we could use in the spec.

Adam

Received on Monday, 5 May 2014 15:27:48 UTC