<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eligrey</id>
	<title>WHATWG Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eligrey"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/wiki/Special:Contributions/Eligrey"/>
	<updated>2026-05-06T10:59:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=User:Eligrey&amp;diff=10005</id>
		<title>User:Eligrey</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=User:Eligrey&amp;diff=10005"/>
		<updated>2015-12-19T07:37:49Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: Added userpage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://eligrey.com Eli Grey]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9640</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9640"/>
		<updated>2014-07-25T16:20:40Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent, up to an optional thread limit per origin.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers and http://nerget.com/rayjs-mt/rayjs.html&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; property should return the number of logical processors available to the user agent, up to an optional thread limit per origin. For example on OS X this should be equivalent to running sysctl -n hw.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be ≥ 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting. Firefox already implements a limit of 20 concurrent workers per origin.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9608</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9608"/>
		<updated>2014-05-27T19:52:51Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent, up to an optional thread limit per origin.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers and http://nerget.com/rayjs-mt/rayjs.html&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; property should return the number of logical processors available to the user agent, up to an optional thread limit per origin. For example on OS X this should be equivalent to running sysctl -n hw.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting. Firefox already implements a limit of 20 concurrent workers per origin.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9593</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9593"/>
		<updated>2014-05-13T05:34:49Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent, up to an optional thread limit per origin.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; property should return the number of logical processors available to the user agent, up to an optional thread limit per origin. For example on OS X this should be equivalent to running sysctl -n hw.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting. Firefox already implements a limit of 20 concurrent workers per origin.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9592</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9592"/>
		<updated>2014-05-13T03:32:17Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: Origin limit stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent, up to an optional thread limit per origin.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; property should return the number of logical processors available to the user agent, up to an optional thread limit per origin. For example on OS X this should be equivalent to running sysctl -n hw.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting. Firefox already implements a limit of 20 concurrent workers.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9591</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9591"/>
		<updated>2014-05-13T03:23:44Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent per origin.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; property should return the number of logical processors available to the user agent per origin. For example on OS X this should be equivalent to running sysctl -n hw.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9590</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9590"/>
		<updated>2014-05-13T03:15:28Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent per origin.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9589</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9589"/>
		<updated>2014-05-12T19:04:17Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9588</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9588"/>
		<updated>2014-05-11T20:03:14Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical processors to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9587</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9587"/>
		<updated>2014-05-11T19:54:00Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications - v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9586</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9586"/>
		<updated>2014-05-11T19:53:41Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: put version on first line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications v1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9585</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9585"/>
		<updated>2014-05-11T16:39:41Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: spec version 1.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
Editor: [http://eligrey.com Eli Grey]&lt;br /&gt;
&lt;br /&gt;
Version 1.0&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9584</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9584"/>
		<updated>2014-05-09T17:49:38Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9581</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9581"/>
		<updated>2014-05-09T15:22:47Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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.availcpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9580</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9580"/>
		<updated>2014-05-09T15:21:56Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
The user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9579</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9579"/>
		<updated>2014-05-09T15:12:20Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents MAY report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful number for this purpose is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt;. Alternatively, the user agent MAY report fewer than the number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9578</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9578"/>
		<updated>2014-05-09T15:08:17Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.hardwareConcurrency || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents MAY report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt;. Alternatively, the user agent MAY report fewer that number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9577</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9577"/>
		<updated>2014-05-09T04:54:35Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.hardwareConcurrency API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;hardwareConcurrency&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long hardwareConcurrency;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents MAY report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.hardwareConcurrency || #&amp;lt;/code&amp;gt;. Alternatively, the user agent MAY report fewer that number of actual logical cores to reduce the efficacy of fingerprinting.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9574</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9574"/>
		<updated>2014-05-08T23:53:57Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this in existing parallel applications implemented with web workers by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. The OS or UA scheduler will handle balancing the load of these threads with everything else on the system.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || #&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9573</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9573"/>
		<updated>2014-05-08T19:37:30Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core and have the OS or UA scheduler handle balancing the load. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || #&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9572</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9572"/>
		<updated>2014-05-08T19:35:27Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = #&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || #&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core and have the OS or UA scheduler handle balancing the load. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || #&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9571</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9571"/>
		<updated>2014-05-08T04:50:41Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core and have the OS or UA scheduler handle balancing the load. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9570</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9570"/>
		<updated>2014-05-08T04:21:11Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt; in order to split up parallel tasks between every logical core. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9569</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9569"/>
		<updated>2014-05-08T04:01:21Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total number of cores available to the user agent can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9568</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9568"/>
		<updated>2014-05-08T03:56:59Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons such as reducing fingerprintability. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9567</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9567"/>
		<updated>2014-05-07T23:41:06Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix on a system with low to moderate system load. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9566</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9566"/>
		<updated>2014-05-07T23:25:42Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript with as many cores as possible to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) faster without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9565</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9565"/>
		<updated>2014-05-07T22:22:58Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons. A suggested useful incorrect number is 0, as this enables fallback support as shown above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9564</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9564"/>
		<updated>2014-05-07T22:08:50Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;workers = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons. A suggested incorrect number is 0, as this enables fallback support as explained above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9563</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9563"/>
		<updated>2014-05-07T22:06:57Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy concerns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy considerations ==&lt;br /&gt;
&lt;br /&gt;
User agents may report an incorrect number for privacy reasons. A suggested incorrect number is 0, as this enables fallback support as explained above with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9562</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9562"/>
		<updated>2014-05-07T22:06:13Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = kDefaultNumber&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;workers = navigator.cores || kDefaultNumber&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9561</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9561"/>
		<updated>2014-05-07T21:25:35Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 0.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9543</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9543"/>
		<updated>2014-05-05T23:36:34Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9542</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9542"/>
		<updated>2014-05-05T23:24:10Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9541</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9541"/>
		<updated>2014-05-03T19:11:13Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase the workload as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9540</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9540"/>
		<updated>2014-05-03T19:00:15Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/cc56e924e450554d4f4c7e1d42e53a42a7633bb2/core-estimator.js#L16-L20 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9539</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9539"/>
		<updated>2014-05-03T18:27:07Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using LZMA2 in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms efficiently on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallelizable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCPU {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Navigator implements NavigatorCPU;&lt;br /&gt;
WorkerNavigator implements NavigatorCPU;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9536</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9536"/>
		<updated>2014-05-03T04:42:14Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode to increase performance, it must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9535</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9535"/>
		<updated>2014-05-03T03:01:37Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Privacy concerns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNaCl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9534</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9534"/>
		<updated>2014-05-03T02:57:15Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size of their worker threadpools to perform parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9533</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9533"/>
		<updated>2014-05-03T02:48:38Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of logical processors available to the user agent.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9532</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9532"/>
		<updated>2014-05-03T02:18:35Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD as you see fit.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9531</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9531"/>
		<updated>2014-05-03T02:17:39Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish the estimation in a timely manner. If you care about accuracy more than runtime length, increase WORKLOAD.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9530</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9530"/>
		<updated>2014-05-03T02:12:30Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; 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&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish estimation in a timely manner. If you care accuracy and precision more than runtime, add a zero or two to WORKLOAD.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9529</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9529"/>
		<updated>2014-05-03T02:09:07Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; property should return the number of logical cores available to the user agent. For example on OS X this should be equivalent to running sysctl -n hw.ncpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/oftn/core-estimator/blob/5337e05fc0745b10862e665ee3aa31884971bda5/core-estimator.js#L16-L18 default configuration] is tuned for medium accuracy in order to finish estimation in a timely manner. If you care accuracy and precision more than runtime, add a zero or two to WORKLOAD.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9528</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9528"/>
		<updated>2014-05-02T23:00:19Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting, the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; property should return the number of logical cores available to the user agent. For example on OS X this should be equivalent to running sysctl -n hw.ncpu&lt;br /&gt;
&lt;br /&gt;
The number must be &amp;gt;= 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9526</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9526"/>
		<updated>2014-05-02T21:43:10Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing with worker threads in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; property should return the number of logical cores available to the user agent. For example on OS X this should be equivalent to running sysctl -n hw.ncpu&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9525</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9525"/>
		<updated>2014-05-02T21:42:33Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Example use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores.&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; property should return the number of logical cores available to the user agent. For example on OS X this should be equivalent to running sysctl -n hw.ncpu&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9524</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9524"/>
		<updated>2014-05-02T21:25:22Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: Clean up abstract wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for smarter Worker pool allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers make informed decisions regarding the size their worker threadpools to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
Developers can easily take advantage of this API by replacing code that does &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;. This allows transparent fallback in browsers that don&#039;t implement this feature.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have, but many users don&#039;t know this information or understand where to get it. Giving users control over thread count can also cause issues where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores (such as their own computer).&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
On getting the &amp;lt;code&amp;gt;cores&amp;lt;/code&amp;gt; property should return the number of logical cores available to the user agent. For example on OS X this should be equivalent to running sysctl -n hw.ncpu&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count can already be approximated with high accuracy given enough time using the polyfill in the appendix. Chrome also exposes it through PNacl.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An open source O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9519</id>
		<title>Navigator HW Concurrency</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=Navigator_HW_Concurrency&amp;diff=9519"/>
		<updated>2014-05-01T20:34:15Z</updated>

		<summary type="html">&lt;p&gt;Eligrey: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Proposed navigator.cores API for efficient Worker allocation in parallel applications&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This specification defines an API for reading the system&#039;s total number of user-accessible logical processors.&lt;br /&gt;
&lt;br /&gt;
The intended use for the API is to help developers appropriately size their worker threadpools for the user&#039;s system in order to perform CPU-intensive parallel algorithms.&lt;br /&gt;
&lt;br /&gt;
As opposed to previous proposals, this does not rely on creating a completely new Worker API. Instead, this API aims to help parallel applications using the current Worker API with hardcoded threadpools increase performance by changing a single line of code. All that parallel applications need to do to make use of this API is to replace code like &amp;lt;code&amp;gt;threads = X&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;threads = navigator.cores || X&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Currently, highly parallel algorithms must prompt the user for how many cores they have. Many users do not know this information, nor should they be expected to know. Giving users control over thread count can lead to massive slowdowns in situations where the user thinks the highest option is best. For example, this can result in 32 threads being run on a user&#039;s dual core laptop when a more appropriate threadpool size is 2 or 4 threads.&lt;br /&gt;
&lt;br /&gt;
== Example use cases ==&lt;br /&gt;
&lt;br /&gt;
* Physics engines for WebGL games: Many physics engines are highly parallelizable, but currently there is no method to determine how many threads to use. Games with optional cosmetic (not affecting gameplay) physics can also use navigator.cores to detect systems with too few cores and disable cosmetic physics by default.&lt;br /&gt;
&lt;br /&gt;
* Using xz (LZMA2) in JavaScript to compress data before saving to disk (with &amp;lt;code&amp;gt;&amp;amp;lt;a download&amp;amp;gt;&amp;lt;/code&amp;gt;) without having to prompt the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Running realtime object/face/movement/etc. detection algorithms on webcam input or video file input, without prompting the user for their core count.&lt;br /&gt;
&lt;br /&gt;
* Image processing in online photo editors is highly parallelizable but often hardcoded to a specific worker count. For example, [http://www.sitepoint.com/using-web-workers-to-improve-image-manipulation-performance/ this recent blog post] on image processing in JavaScript suggests hardcoding the worker count to 4. All the author has to do to is replace the 4 with &amp;lt;code&amp;gt;navigator.cores || 4&amp;lt;/code&amp;gt; to increase performance in computers with more cores (such as their own computer).&lt;br /&gt;
&lt;br /&gt;
* Multithreaded silent OCR: A current attempt at automatic silent OCR is http://projectnaptha.com/ (single-threaded). If Project Naptha is ever going to use the multithreaded Ocrad mode, they must currently prompt the user for a core count. This defeats the purpose of a silent background processing script by interrupting the user with a prompt.&lt;br /&gt;
&lt;br /&gt;
* Anything else highly parallizeable, such as raytracer webapps like http://tech.pusherhq.com/demo/raytracer_workers&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebIDL&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[NoInterfaceObject, Exposed=Window,Worker]&lt;br /&gt;
interface NavigatorCores {&lt;br /&gt;
    readonly attribute unsigned long cores;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy concerns ==&lt;br /&gt;
&lt;br /&gt;
System core count is public information as it is already accessible with the polyfill in the appendix. If you believe core count is a privacy leak, then the only solution is to completely remove web worker threads from the specification, as a timing attack on threadpool performance will always be possible otherwise.&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
An O(log n) (in the number of cores) polyfill in JavaScript can be found at:&lt;br /&gt;
&lt;br /&gt;
:https://github.com/oftn/core-estimator&lt;br /&gt;
&lt;br /&gt;
The polyfill works by running a timing attack on the measured runtime of a worker threadpool that is resized according to a binary search and statistical analysis results until performance no longer increases with the number of threads.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Eligrey</name></author>
	</entry>
</feed>