Lodash cloneDeep vs structuredClone vs cloneObject (custom func)

https://developer.mozilla.org/en-US/docs/Web/API/structuredClone
one year ago
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Test name Executions per second
Lodash cloneDeep 571579.1 Ops/sec
Native structuredClone 241363.4 Ops/sec
My shitty simple clone logic 1168613.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash cloneDeep

  • Native structuredClone

  • My shitty simple clone logic

Open this result on MeasureThat.net