jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
var a = new Float32Array(16);
for(var i = 0; i<a.length; i++){
a[i] = i;
}
Float32Array.prototype.copy = function(){
var b = new Float32Array(16);
b[0] = this[0];
b[1] = this[1];
b[2] = this[2];
b[3] = this[3];
b[4] = this[4];
b[5] = this[5];
b[6] = this[6];
b[7] = this[7];
b[8] = this[8];
b[9] = this[9];
b[10] = this[10];
b[11] = this[11];
b[12] = this[12];
b[13] = this[13];
b[14] = this[14];
b[15] = this[15];
return b;
}
function copy(a){
var b = new Float32Array(16);
b[0] = a[0];
b[1] = a[1];
b[2] = a[2];
b[3] = a[3];
b[4] = a[4];
b[5] = a[5];
b[6] = a[6];
b[7] = a[7];
b[8] = a[8];
b[9] = a[9];
b[10] = a[10];
b[11] = a[11];
b[12] = a[12];
b[13] = a[13];
b[14] = a[14];
b[15] = a[15];
return b;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
new float32array |
| ready |
copy manual |
| ready |
copy fn |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.