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 src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>const testArray = [];
for (let i = 0; i < 100000; i++) {
if (i % 5 === 0) {
testArray.push(`string-${i}`);
} else if (i % 3 === 0) {
testArray.push(null);
} else if (i % 2 === 0) {
testArray.push(i);
} else {
testArray.push(i % 7 === 0); // boolean
}
}
const valuesToRemove = [
50,
'string-100',
null,
true,
999999,
'non-existent-string'
];Ready to run.
| Test | Ops/sec | |
|---|---|---|
| _.without | | ready |
| .filter | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.