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
Comparing solutions offered at http://stackoverflow.com/questions/30126698/how-to-get-union-of-several-immutable-js-lists
<script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.7.6/immutable.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.5.1/lodash.js"></script>
function getListA() {
var i = 0;
var list = [];
while (++i < 1000) {
list.push(i);
}
return list;
}
function getListB() {
var i = 990;
var list = [];
while (++i < 1010) {
list.push(i);
}
return list;
}
var a = Immutable.List(getListA());
var b = getListB();
Ready to run.
Test | Ops/sec | |
---|---|---|
Union ala Travis J |
| ready |
Array includes |
| ready |
lodash union |
| ready |
toSet |
| ready |
Array includes 2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.