lodash map vs array from (v13)

Revision 13 of this benchmark created by lodash map vs array from on


Preparation HTML

<script src="https://raw.githubusercontent.com/lodash/lodash/master/lodash.min.js"></script>

Setup

var vals = new Array(999)
    for(var i = 0; i < vals.length; i++){vals[i] = i}

Test runner

Ready to run.

Testing in
TestOps/sec
lodash map
_.map(vals, function(x,i) { return x * i; });
ready
array from
Array.from(vals, function(x,i) { return x * i; });
ready

Revisions

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