I created jsPref to check this asm.js thing: http://jsperf.com/asm-diag
I think I did something wrong, because asmjs code is twice as slow as regular js code, even in firefox at night.
I do not know what is wrong in the code.
Thanks in advance,
Edit:
Benchmark.prototype.setup = function() { function DiagModule(stdlib, foreign, heap) { "use asm";
ASM:
var _diag = diag(10, 100);
regular:
var _diag = Math.sqrt(Math.pow(10, 2) + Math.pow(100, 2))
source share