native map vs underscore map

Benchmark created on


Preparation HTML

<script src="https://documentcloud.github.com/underscore/underscore-min.js"></script>

Setup

arr = [1, 2, 3, 4, 5];

Test runner

Ready to run.

Testing in
TestOps/sec
Native map
arr.map(function(entry) {
  return entry + 1;
});
ready
Undescore map
_.map(arr, function(entry) {
  return entry + 1;
});
ready

Revisions

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