Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Linux
Desktop
one year ago
Test name Executions per second
Object values 11530333.0 Ops/sec
_.values 10472404.0 Ops/sec
HTML Preparation code:
AخA
 
1
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.core.js"></script>
Tests:
  • Object values

     
    var a = { a: {pk: '1', bounding: {left: 34, right: 32}}, b: {pk: '2', bounding: {left: 32, right: 34}}, c: {pk: '3', bounding: {left: 2, right: 1}}};
    Object.values(a);
  • _.values

     
    var a = { a: {pk: '1', bounding: {left: 34, right: 32}}, b: {pk: '2', bounding: {left: 32, right: 34}}, c: {pk: '3', bounding: {left: 2, right: 1}}};
    _.values(a);