Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 OPR/113.0.0.0
Opera 113
Linux
Desktop
15 days ago
Test name Executions per second
spread ... 41727336.0 Ops/sec
slice() 49410308.0 Ops/sec
splice(0) 35043160.0 Ops/sec
concat() 43656356.0 Ops/sec
JSON.parse(JSON.stringify()) 2299900.8 Ops/sec
Custom function 1707988.1 Ops/sec
Lodash.cloneDeep() 1379986.4 Ops/sec
jQuery.extend(true) 1195408.6 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;