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
Stackoverflow question:
What is the most efficient method to groupby on a javascript array of objects?
http://stackoverflow.com/questions/14446511/what-is-the-most-efficient-method-to-groupby-on-a-javascript-array-of-objects?lq=1
Tests are running on 2^20 records (about 1000000 records).
<script src="http://alasql.org/console/alasql.min.js"></script>
<script src="http://neue.cc/linq.min.js"></script>
var data = [{
Phase: "Phase 1",
Step: "Step 1",
Task: "Task 1",
Value: "5"
}, {
Phase: "Phase 1",
Step: "Step 1",
Task: "Task 2",
Value: "10"
}, {
Phase: "Phase 1",
Step: "Step 2",
Task: "Task 1",
Value: "15"
}, {
Phase: "Phase 1",
Step: "Step 2",
Task: "Task 2",
Value: "20"
}, {
Phase: "Phase 2",
Step: "Step 1",
Task: "Task 1",
Value: "25"
}, {
Phase: "Phase 2",
Step: "Step 1",
Task: "Task 2",
Value: "30"
}, {
Phase: "Phase 2",
Step: "Step 2",
Task: "Task 1",
Value: "35"
}, {
Phase: "Phase 2",
Step: "Step 2",
Task: "Task 2",
Value: "40"
}];
for (var i = 0; i < 17; i++) {
data = data.concat(data);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Alasql (with compilation) |
| ready |
Alasql (without compilation) |
| ready |
Lnq |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.