Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JSON.stringify vs slice
JSON.stringify vs slice
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0
Browser:
Firefox 151
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one month ago
Test name
Executions per second
JSON.stringify
1062059.9 Ops/sec
structuredClone
33337794.0 Ops/sec
Script Preparation code:
var vertices = [ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], ] var myCopy = null;
Tests:
JSON.stringify
myCopy = JSON.parse(JSON.stringify(vertices));
structuredClone
myCopy = vertices.slice();