Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array destructing vs object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Array destructing
129087.9 Ops/sec
Object
72820.8 Ops/sec
Tests:
Array destructing
function f(n) { if (n <= 2) { return [1, 1] } const [a, b] = f(n - 1) const [c, d] = f(n - 2) return [a + b, c + d] } f(15)
Object
function f(n) { if (n <= 2) { return {0:1,1:1} } const {0:a, 1:b} = f(n - 1) const {0:c, 1:d} = f(n - 2) return {0:a + b, 1:c + d} } f(15)