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="//rawgit.com/megawac/underscore/shuffle/underscore.js">
</script>
<script>var megascore = _.noConflict();</script>
<script src="//rawgit.com/lodash/lodash/master/dist/lodash.js"></script>
<script>var lodash = _.noConflict();</script>
<script src="http://rawgit.com/jashkenas/underscore/master/underscore.js">
</script>
<script>
megascore.shuffle2 = function(obj) {
var arr = _.toArray(obj);
var length = arr.length;
while (length--) {
var rand = _.random(0, length);
var t = arr[length];
arr[length] = arr[rand];
arr[rand] = t;
}
return arr;
};
var arr = _.range(100);
</script>
var lodash = window.lodash,
knut3 = window.knut3,
underscore = window.underscore;
Ready to run.
Test | Ops/sec | |
---|---|---|
_.shuffle |
| ready |
lodash.shuffle |
| ready |
changed Underscrore.shuffle |
| ready |
_.shuffle2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.