Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 OPR/103.0.0.0
Opera 103
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Spread Syntax 58.3 Ops/sec
Object.assign 56.2 Ops/sec
Object.fromEntries and Object.entries: 48.3 Ops/sec
JSON 53.6 Ops/sec
Reference Assignment 65.3 Ops/sec
Deep copy using a recursive function 58.7 Ops/sec
Script Preparation code:
Tests:
  • Spread Syntax

  • Object.assign

  • Object.fromEntries and Object.entries:

  • JSON

  • Reference Assignment

  • Deep copy using a recursive function