Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Spread Vs Destructure vs naiive in variable assignment
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Linux
Device Platform:
Desktop
Date tested:
6 months ago
Test name
Executions per second
Spread
128588528.0 Ops/sec
Destructure
131641184.0 Ops/sec
Naiive
127597480.0 Ops/sec
Script Preparation code:
var input = [1, 2, 3];
Tests:
Spread
const [a, b, c] = input;
Destructure
const {0: a, 1: b, 2: c} = input;
Naiive
const a = input[0]; const b = input[1]; const c = input[2];