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.8.3/underscore-min.js"></script>
var results;
var objects = {
id: 3,
user_id: 3,
gender: 'male',
birthdate: '1978-4-26',
city: 'Copenhagen',
country_id: 58,
active: 1,
visible: 1,
timestamp: 1348659760,
photo_id: 1386,
description_id: 20
}
function clone(obj) {
if (null == obj || "object" != typeof obj) return obj;
var copy = obj.constructor();
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
}
return copy;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
With function |
| ready |
With underscore |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.