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.7.0/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
var lodash = _.noConflict();
</script>
var numbers = [];
var object = {};
for (var i = 0; i < 20; i++) {
numbers[i] = i;
object['key' + i] = i;
}
var objects = _.map(numbers, function(n) { return { 'num': n }; });
var randomized = _.sortBy(numbers, function() { return Math.random(); });
Ready to run.
Test | Ops/sec | |
---|---|---|
each |
| ready |
each lodash |
| ready |
each object |
| ready |
each object lodash |
| ready |
keys |
| ready |
keys lodash |
| ready |
map |
| ready |
map lodash |
| ready |
pluck |
| ready |
pluck lodash |
| ready |
values |
| ready |
values lodash |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.