Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
JSON.stringify 959123.3 Ops/sec
slice 7877151.5 Ops/sec
Array from 4227278.0 Ops/sec
Spread 7535110.0 Ops/sec
structuredClone 389524.9 Ops/sec
Script Preparation code:
Tests:
  • JSON.stringify

  • slice

  • Array from

  • Spread

  • structuredClone