I\'ve been trying to find out just how capable web workers are of distributing processor load. I\'ve yet to find any demos that seem to be able to get my quad core 2600k to even
This uses 100% on my 2500K:
var code = "while(true){}";
var URL = window.webkitURL || window.URL;
var bb = new Blob([code], {type : 'text/javascript'});
code = URL.createObjectURL(bb);
new Worker(code);
new Worker(code);
new Worker(code);
new Worker(code);
http://jsfiddle.net/MTJ27/81/
I have re-written Esailija's answer using the new blob constructor. BlobBuilder is now outdated, so you must use Blob() instead, see here for the deets: http://updates.html5rocks.com/2012/06/Don-t-Build-Blobs-Construct-Them
window.URL = window.URL || window.webkitURL;
var blob = new Blob(["while(true){}"], {type: 'text/javascript'});
code = window.URL.createObjectURL(blob);
new Worker(code);
new Worker(code);
new Worker(code);
new Worker(code);
http://jsfiddle.net/MTJ27/15/