Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Windows
Desktop
10 months ago
Test name Executions per second
spread ... 21329258.0 Ops/sec
slice() 33912596.0 Ops/sec
splice(0) 20317782.0 Ops/sec
concat() 31645822.0 Ops/sec
JSON.parse(JSON.stringify()) 2095596.1 Ops/sec
Custom function 2788698.2 Ops/sec
Lodash.cloneDeep() 1594272.1 Ops/sec
jQuery.extend(true) 1244662.8 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)


;