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
Utility will try to avoid failures like
var obj = {nodeType: 1}
But what is the performance cost?
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.min.js">
</script>
<script src="//utility-js.googlecode.com/files/utility3.js"></script>
var b = [{}, function() {}, [], "", 1, new Date(), /abc/, new Error(), $, $(), $u, $u(), undefined, null, document],
c= [window], // Firefox throws an error if we walk this object
a = [].concat(b).concat(c);
b.forEach(function(obj) {
try {
Object.getOwnPropertyNames(obj).forEach(function(name) {
var d, t;
try {
a.push(obj[name]);
} catch (e) {}
});
} catch (e) {}
});
function isPlainObject(o) {
return Object.prototype.toString.call(o) === '[object Object]';
}
Ready to run.
Test | Ops/sec | |
---|---|---|
jquery |
| ready |
utility |
| ready |
lodash |
| ready |
alt |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.