Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Map: Native vs Lodash vs Rambda vs Sanctuary
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Browser:
Chrome 123
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
Native
4977613.0 Ops/sec
Lodash
7352540.5 Ops/sec
Rambda
7784672.5 Ops/sec
Sanctuary
3424660.0 Ops/sec
HTML Preparation code:
<script src="https://unpkg.com/lodash@4.17.11/lodash.min.js"></script> <script src="https://unpkg.com/rambdax@2.8.1/dist/rambdax.umd.js"></script> <script src="https://unpkg.com/sanctuary-show@1.0.0/index.js"></script> <script src="https://unpkg.com/sanctuary-type-identifiers@2.0.1/index.js"></script> <script src="https://unpkg.com/sanctuary-type-classes@9.0.0/index.js"></script> <script src="https://unpkg.com/sanctuary-either@1.0.0/index.js"></script> <script src="https://unpkg.com/sanctuary-maybe@1.0.0/index.js"></script> <script src="https://unpkg.com/sanctuary-pair@1.0.0/index.js"></script> <script src="https://unpkg.com/sanctuary-def@0.18.1/index.js"></script> <script src="https://unpkg.com/sanctuary@0.15.0/index.js"></script>
Script Preparation code:
function double(n) { return n*2; } var data = [...Array(20)].map((v, idx) => idx); const S = sanctuary.create({ checkTypes: localStorage.getItem ('SANCTUARY_CHECK_TYPES') === 'true', env: sanctuary.env, }); var sanct = S.map(double)
Tests:
Native
data.map(double);
Lodash
_.map(data, double);
Rambda
R.map(double, data);
Sanctuary
sanct(data);