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
Find fastest way to check whether a year is a leap year.
<script>
function checkYears(fn) {
var years = [1900, 1970, 1991, 1995, 2000, 2007, 2010],
length = years.length,
i = 0;
for (; i < length; i++) {
fn(years[i]);
}
}
regex1 = /([48cg]|[^5af]0)$/;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Modulo (truthy) |
| ready |
Modulo (equals zero) |
| ready |
Check for 29 February |
| ready |
Base20 with regex |
| ready |
Odd bit manipulations |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.