HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Tests:
  • Object.entries and Array.map

     
    const stats = { size: 5, age: 37, length: 10 };
    const result = Object.fromEntries(
      Object.entries(stats).map(([key, value]) => [key, value * 3])
    );
  • Lodash map

     
    const stats = { size: 5, age: 37, length: 10 };
    const result = _.mapValues(stats, (val) => val * 3);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object.entries and Array.map
    Lodash map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89 on Windows
View result in a separate tab
Test name Executions per second
Object.entries and Array.map 450310.7 Ops/sec
Lodash map 1135384.8 Ops/sec