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
<script>
var sets = 1;
var set_size = 512;
var len = sets * set_size;
var obj = [];
var utf8_encoder = new TextEncoder("utf-8");
var a = new ArrayBuffer(len);
var dv = new DataView(a);
var b = new ArrayBuffer(len);
var u8 = new Uint8Array(b);
add_set(function (i) { return utf8_encoder.encode(i); });
console.log(obj);
function add_set (callback) {
++sets;
for (var i=0; i<set_size; ++i) {
obj.push(callback(i));
}
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
DataView write |
| ready |
Uint8 write |
| ready |
DataView read |
| ready |
Uint8 read |
| ready |
JSON stringify |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.