lodash map vs array from (v14)

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


Preparation HTML

<script type="text/javascript" src="https://rawgit.com/lodash/lodash/3.10.1/lodash.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.