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://rawgit.com/CrossEye/ramda/13c176720b72fd4610aa4fdc354396c0c43d2187/ramda.js"></script>
<script>var ramdaOld = ramda;</script>
<script src="https://rawgit.com/CrossEye/ramda/9ed5b16d849066e7ccb000099c6eb731e295f4a7/ramda.js"></script>
<script src="https://rawgit.com/lodash/lodash/30cddd09343b1eaf4e4f0905476636607822dde5/dist/lodash.js"></script>
var f = function(prop, obj) {
return obj === undefined ? function(obj) { return obj[prop]; } : obj[prop];
};
var g = function(prop, obj) {
return arguments.length < 2 ? function(obj) { return obj[prop]; } : obj[prop];
};
var g2 = function(prop, obj) {
return arguments.length === 0 ? g2 :
arguments.length < 2 ? function(obj) { return obj[prop]; } :
obj[prop];
};
var r1 = ramdaOld.get('foo'),
r2 = ramda.get('foo'),
l = _.property('foo'),
manual = f('foo'),
manual2 = g('foo'),
manual3 = g2('foo');
var object = { 'foo': true };
Ready to run.
Test | Ops/sec | |
---|---|---|
manual w/ arg.length check |
| ready |
manual guard vs. no args |
| ready |
ramda.get (new) |
| ready |
manual |
| ready |
ramda.get (old) |
| ready |
_.property |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.