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 abc = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], result = 0;
function num(e,i,o){
var t = Number(e);
if(!isNaN(t))
result += t;
}
function pai(e,i,o){
var t = parseInt(e);
if(!isNaN(t))
result += t;
}
function paf(e,i,o){
var t = parseFloat(e);
if(!isNaN(t))
result += t;
}
function imp(e,i,o){
var t = +e;
if(!isNaN(t))
result += t;
}
function bor(e,i,o){
result += 0|e;
}
function bxo(e,i,o){
result += 0^e;
}
function bno(e,i,o){
result += ~~e;
}
function ble(e,i,o){
result += e<<0;
}
function bri(e,i,o){
result += e>>0;
}
function bbr(e,i,o){
result += e>>>0;
}
if(result !== 90)
throw "Test not implemented properly; result = " + result;
Ready to run.
Test | Ops/sec | |
---|---|---|
Number() |
| ready |
parsetInt() |
| ready |
parseFloat() |
| ready |
implicit |
| ready |
Bitwse OR |
| ready |
Bitwise XOR |
| ready |
Bitwise NOT NOT |
| ready |
Bitwise Left Shift |
| ready |
Bitwise Right Shift |
| ready |
Bitwise Bitwise Right Shift |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.