HTML Preparation code:
Tests:

Historical Performance Data aggregated from 27 community runs

Desktop Results:
Chrome 21 runs
lodash mapValues
4.5M/s
native approach with reduce
325K/s
native approach fromEntries
286K/s

Fastest: lodash mapValues (15.7x faster)

View exact numbers
  • lodash mapValues: 4,479,920 ops/sec
  • native approach with reduce: 324,525 ops/sec
  • native approach fromEntries: 286,133 ops/sec
Firefox 6 runs
lodash mapValues
3.1M/s
native approach with reduce
115K/s
native approach fromEntries
109K/s

Fastest: lodash mapValues (28.7x faster)

View exact numbers
  • lodash mapValues: 3,116,650 ops/sec
  • native approach with reduce: 114,670 ops/sec
  • native approach fromEntries: 108,751 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    native approach with reduce
    native approach fromEntries
    lodash mapValues

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Mac OS X 10.15.7
View result in a separate tab
lodash mapValues
14.7M/s
native approach with reduce
562K/s
native approach fromEntries
529K/s
View exact numbers
Test name Executions per second
lodash mapValues 14,709,377 Ops/sec
native approach with reduce 561,685 Ops/sec
native approach fromEntries 528,806 Ops/sec