Lodash keys vs Object.keys

Benchmark created by Tom on


Preparation HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>

Setup

input = {};
    output = {};
    var count = 100;
    
    while (count-- > 0) {
      input[count + "key"] = count;
    }

Teardown


    output = null;
  

Test runner

Ready to run.

Testing in
TestOps/sec
Lodash
output = _.keys(input)
ready
Object.keys
output = Object.keys(input)
ready

Revisions

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