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 stringArray = [
"ALPHA",
"BRAVO",
"CHARLIE",
"DELTA",
"ECHO",
"FOXTROT",
"GOLF",
"HOTEL",
"INDIA",
"JULIET",
"KILO",
"LIMA",
"MIKE",
"NOVEMBER",
"OSCAR",
"PAPA",
"QUEBEC",
"ROMEO",
"SIERRA",
"TANGO",
"UNIFORM",
"VICTOR",
"WHISKEY",
"X-RAY",
"YANKEE",
"ZULU",
"APPLE",
"BANANA",
"CHERRY",
"DATE",
"ELDERBERRY",
"FIG",
"GRAPE",
"HONEYDEW",
"KIWI",
"LEMON",
"MANGO",
"NECTARINE",
"ORANGE",
"PEACH",
"QUINCE",
"RASPBERRY",
"STRAWBERRY",
"TANGERINE",
"UGLI",
"VOAVANGA",
"WATERMELON",
"XIGUA",
"YELLOWPASSIONFRUIT",
"ZUCCINI",
];
const valueToFindInStrings = "NOVEMBER"; // Exists
const valueToNotFindInStrings = "POTATO"; // Does not exist
const numberArray = [];
for (let i = 0; i < 50; i++) {
numberArray.push(i * 3 + 1);
}
const valueToFindInNumbers = 46; // Exists (15*3 + 1)
const valueToNotFindInNumbers = 101; // Does not exist
Ready to run.
| Test | Ops/sec | |
|---|---|---|
| _.contains | | ready |
| .includes | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.