Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Object values 5740894.0 Ops/sec
_.values 3771747.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);