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
const CATEGORY_A = "Category A";
const CATEGORY_B = "Category B";
const CATEGORY_C = "Category C";
function lookupCategoryName(category) {
if (category === CATEGORY_A) {
return "Name A";
}
if (category === CATEGORY_B) {
return "Name B";
}
if (category === CATEGORY_C) {
return "Name C";
}
}
const LOOKUP_OBJECT = {
CATEGORY_A: "Name A",
CATEGORY_B: "Name B",
CATEGORY_C: "Name C"
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Comparison Function |
| ready |
Object Lookup |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.