HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 9 community runs

Desktop Results:
Chrome 9 runs
spread
8.9M/s
obj.assign
3.1M/s
Ramda clone
2.2M/s
manual stack
1.8M/s
og hand rolled (still recursive)
1.6M/s
Lodash cloneDeep
1.4M/s
Json clone
1.1M/s
hand rolled
1.1M/s

Fastest: spread (8.5x faster)

View exact numbers
  • spread: 8,941,401 ops/sec
  • obj.assign: 3,086,149 ops/sec
  • Ramda clone: 2,168,114 ops/sec
  • manual stack: 1,848,455 ops/sec
  • og hand rolled (still recursive): 1,636,745 ops/sec
  • Lodash cloneDeep: 1,394,485 ops/sec
  • Json clone: 1,112,394 ops/sec
  • hand rolled: 1,052,149 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Lodash cloneDeep
    Json clone
    Ramda clone
    hand rolled
    spread
    obj.assign
    og hand rolled (still recursive)
    manual stack

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0
Chrome 136 on Windows
View result in a separate tab
spread
13.2M/s
obj.assign
12.7M/s
manual stack
5.1M/s
og hand rolled (still recursive)
4.0M/s
Ramda clone
3.3M/s
hand rolled
3.2M/s
Lodash cloneDeep
1.8M/s
Json clone
1.5M/s
View exact numbers
Test name Executions per second
spread 13,207,563 Ops/sec
obj.assign 12,699,029 Ops/sec
manual stack 5,144,866 Ops/sec
og hand rolled (still recursive) 4,047,103 Ops/sec
Ramda clone 3,287,766 Ops/sec
hand rolled 3,193,861 Ops/sec
Lodash cloneDeep 1,789,795 Ops/sec
Json clone 1,534,792 Ops/sec