Ramda assocPath vs Lodash set

Benchmark created on


Preparation HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.29.1/ramda.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.14.194/lodash.min.js"></script>

Setup

var item = {}

Test runner

Ready to run.

Testing in
TestOps/sec
ramda
var result = R.assocPath(['a','b','c'], 1, item)
ready
lodash
var result = _.set(item, 'a.b.c', 1)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.