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
Test reading and writing to all kinds of typed arrays, and of course classic arrays too.
<script>
var size = 640 * 480;
var ui32 = new Uint32Array( size );
for (var idx = 0; idx < size; idx++) ui32[idx] = Math.floor( Math.random() * 256 * 256 * 256 * 256 );
var ui16 = new Uint16Array( size );
for (var idx = 0; idx < size; idx++) ui16[idx] = Math.floor( Math.random() * 256 * 256 );
var ui8 = new Uint8Array( size );
for (var idx = 0; idx < size; idx++) ui8[idx] = Math.floor( Math.random() * 256 );
var i32 = new Int32Array( size );
for (var idx = 0; idx < size; idx++) i32[idx] = Math.floor( Math.random() * 256 * 256 * 256 * 256 );
var i16 = new Int16Array( size );
for (var idx = 0; idx < size; idx++) i16[idx] = Math.floor( Math.random() * 256 * 256 );
var i8 = new Int8Array( size );
for (var idx = 0; idx < size; idx++) i8[idx] = Math.floor( Math.random() * 256 );
var f32 = new Float32Array( size );
for (var idx = 0; idx < size; idx++) f32[idx] = Math.random();
// var f64 = new Float64Array( size );
// for (var idx = 0; idx < size; idx++) f64[idx] = Math.random();
var arr = new Array();
for (var idx = 0; idx < size; idx++) arr[idx] = Math.floor( Math.random() * 256 );
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Uint32Array |
| ready |
Uint16Array |
| ready |
Uint8Array |
| ready |
Int32Array |
| ready |
Int16Array |
| ready |
Int8Array |
| ready |
Float32Array |
| ready |
Uint32Array (REPEAT) |
| ready |
Array |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.