Lodash keys vs Object.keys (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>var lodash2 = _.noConflict();</script>
<script src="//cdn.rawgit.com/lodash/lodash/3.0.0/lodash.js"></script>
<script>var lodash3 = _.noConflict();</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 2.4.1
output = lodash2.keys(input)
ready
Object.keys
output = Object.keys(input)
ready
Lodash 3.0.0
output = lodash3.keys(input)
ready

Revisions

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