Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
deep clone - lodash vs ramda vs json
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 119
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
lodash - cloneDeep
260153.3 Ops/sec
json - parse/stringify
144120.8 Ops/sec
ramda - clone
374123.1 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"></script>
Script Preparation code:
var obj = { author: 'Jason Carmona', fieldNumber: 112050642, nestedObject: { funFact1: 'You burn more calories sleeping than you do watching television', funFact2: 'The average person spends 6 months of their lifetime waiting on a red light to turn green', funFact3: 'There are more possible iterations of a game of chess than there are atoms in the known universe', funFact4: 'Coca-Cola would be green if coloring wasn’t added to it', funFact5: 'You cannot snore and dream at the same time' } }; var objCopy = null;
Tests:
lodash - cloneDeep
objCopy = _.cloneDeep(obj);
json - parse/stringify
objCopy = JSON.parse(JSON.stringify(obj));
ramda - clone
objCopy = R.clone(obj);