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://cdn.rawgit.com/lodash/lodash/666cd8672ee5055385e9c2859cb500d0db9ea385/dist/lodash.js"></script>
<script src="https://rawgit.com/megawac/ramda/where2/ramda.js"></script>
<script>var meda = ramda;</script>
<script src="https://rawgit.com/CrossEye/ramda/ae679616dbecd6536367cf91a56d201b45efbadf/ramda.js"></script>
var filter = ramda.filter;
var where = ramda.where;
var isEmpty = ramda.isEmpty;
var matches = _.compose(_.isEmpty, _.property('x'));
var objs = [{
x: [1, 2]
}, {
x: [1, 3]
}, {
x: []
}, {
x: [2]
}, {
x: [3]
}, {
x: [1]
}, {
x: [1, 2, 3]
}, {
x: []
}, {
x: [1, 2]
}, {
x: [1, 3]
}];
var filterEmpty = filter(where({
x: isEmpty
}));
var medaFilterEmpty = filter(meda.where({
x: isEmpty
}));
Ready to run.
Test | Ops/sec | |
---|---|---|
_.filter(objs, matches); |
| ready |
filter(where({x: isEmpty}), objs); |
| ready |
filter(where({x: isEmpty}))(objs); |
| ready |
meda filter(where({x: isEmpty}), objs); |
| ready |
meda filter(where({x: isEmpty}))(objs); |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.