Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.967 YaBrowser/23.9.1.967 Yowser/2.5 Safari/537.36
Yandex Browser 23
Windows
Desktop
one year ago
Test name Executions per second
spread ... 60601620.0 Ops/sec
slice() 81129120.0 Ops/sec
splice(0) 51594456.0 Ops/sec
concat() 74282376.0 Ops/sec
JSON.parse(JSON.stringify()) 1705651.0 Ops/sec
Custom function 1366589.6 Ops/sec
Lodash.cloneDeep() 1360045.6 Ops/sec
jQuery.extend(true) 1071092.9 Ops/sec
HTML Preparation code:
Tests:
  • spread ...

  • slice()

  • splice(0)

  • concat()

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)