Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
123456789
(version: 0)
Comparing performance of:
1 vs 2
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"></script>
Tests:
1
const area = 'SOAP' const NO_RIGHTS = { create: false, read: false, update: false, delete: false, } const roles = new Array(100000).fill({ permissions: {[area]: { create: true } } }) const result = roles .map(R.path(['permissions', area])) .filter(Boolean) .reduce(R.mergeWith(R.or), NO_RIGHTS)
2
const area = 'SOAP' const NO_RIGHTS = { create: false, read: false, update: false, delete: false, } const roles = new Array(100000).fill({ permissions: {[area]: { create: true } } }) const result = roles .reduce( (acc, { permissions }) => { const crud = permissions[area] return crud ? R.mergeWith(R.or, crud, acc) : acc }, NO_RIGHTS, )
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
1
2
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!
Related benchmarks:
Array.prototype.map vs. Ramda.map
lodash includes vs ramda includes
lodash flow vs ramda pipe
Ramda pipe vs lodash flow
Lodash vs Ramda fromPairs
Comments
Confirm delete:
Do you really want to delete benchmark?