asmjs
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var asm = new Function("stdlib", " \"use asm\";\n var pow = stdlib.Math.pow;\n\n function mandlebrot(cx, cy, maxIter) {\n cx = +cx;\n cy = +cy;\n maxIter = maxIter0;\n var iter=0;\n var xn= 0.0;\n var x = 0.0;\n var y = 0.0;\n while ( ((pow(x,2.0) + pow(y,2.0)) < 4.0)&((iter0) < (maxIter0))) {\n xn = +( pow(x,2.0)  pow(y,2.0) + cx);\n y = +((x*y)*2.0 + cy);\n x = +xn;\n iter=(iter+1)0;\n }\n \n return iter0;\n }\n return {\n mandlebrot: mandlebrot\n};");
var noasm =new Function("stdlib", " var pow = stdlib.Math.pow;\n\n function mandlebrot(cx, cy, maxIter) {\n cx = +cx;\n cy = +cy;\n maxIter = maxIter0;\n var iter=0;\n var xn= 0.0;\n var x = 0.0;\n var y = 0.0;\n while ( ((pow(x,2.0) + pow(y,2.0)) < 4.0)&((iter0) < (maxIter0))) {\n xn = +( pow(x,2.0)  pow(y,2.0) + cx);\n y = +((x*y)*2.0 + cy);\n x = +xn;\n iter=(iter+1)0;\n }\n \n return iter0;\n }\n return {\n mandlebrot: mandlebrot\n};");
var withasm=asm(window);
var withoutasm=noasm(window);
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test  Ops/sec  

Regular 

pending… 
asm 

pending… 
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit
to the URL. Here’s a list of current revisions for this page:
 Revision 2: published by Calvin Metcalf and last updated
 Revision 3: published by Calvin
 Revision 4: published by Calvin Metcalf
 Revision 5: published
 Revision 6: published by Calvin Metcalf
 Revision 7: published
 Revision 8: published
 Revision 9: published by Calvin Metcalf
 Revision 10: published by Calvin
 Revision 11: published by Calvin Metcalf
 Revision 12: published
 Revision 13: published by ryanttb
 Revision 14: published by Calvin
 Revision 15: published by Calvin Metcalf and last updated
 Revision 16: published
0 comments
Comment form temporarily disabled.