Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Ramda groupby
(version: 0)
Comparing performance of:
Ramda vs Vanilla
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.29.1/ramda.min.js"></script>
Script Preparation code:
const dag = { nodes: [ {id: '1'}, {id: '2'}, {id: '3'}, {id: '4'} ], links: [ {fromId: '1', fromPort: 'Output', toId: '2', toPort: 'Input'}, {fromId: '1', fromPort: 'Output', toId: '3', toPort: 'Input'}, {fromId: '2', fromPort: 'Output', toId: '4', toPort: 'Input'}, {fromId: '3', fromPort: 'Output', toId: '4', toPort: 'Input'}, ] }
Tests:
Ramda
const incomingLinksById = R.groupBy(l => l.toId, dag.links)
Vanilla
const incomingLinksById = dag.links.reduce((acc, link) => { console.log(acc, link) if (!acc[link.toId]) { acc[link.toId] = [link]; } else { acc[link.toId].push(link); } return acc; }, {});
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Ramda
Vanilla
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?