Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Linux
Desktop
3 months ago
Test name Executions per second
Spread operator (...) 2619470.0 Ops/sec
JSON.parse(JSON.stringify()) 268294.0 Ops/sec
Custom function 1006114.8 Ops/sec
Lodash.cloneDeep() 206676.5 Ops/sec
jQuery.extend(true) 369581.7 Ops/sec
structuredClone() 214335.5 Ops/sec
HTML Preparation code:
Tests:
  • Spread operator (...)

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)

  • structuredClone()


;