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
some wild tests to get the users utc offset by vanilla js or moment
<script type="text/javascript" src="https://momentjs.com/downloads/moment-with-locales.min.js"></script>
let now = new Date()
let momentNow = moment()
Ready to run.
Test | Ops/sec | |
---|---|---|
Vanilla - GetTimezoneOffset - Cached Date |
| ready |
Vanilla - GetTimezoneOffset - Current Date |
| ready |
Moment - UtcOffset - Cached Moment-Date |
| ready |
Moment - UtcOffset - Current Moment Date |
| ready |
Moment - GetTimezoneOffset - Cached Moment-Date - internal |
| ready |
Moment - GetTimezoneOffset - Cached Moment-Date - toDate |
| ready |
Vanilla - GetTimezoneOffset - Current Date - *-1 |
| ready |
Vanilla - GetTimezoneOffset - Cached Date - *-1 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.