Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
object destructuring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
Browser:
Firefox 135
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
test1
7759248.0 Ops/sec
test2
7587735.5 Ops/sec
test3
3609381.0 Ops/sec
HTML Preparation code:
<script> const o1 = { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26 } const o2 = [...Object.values(o1)]; function f1() { let a = o1.a; let b = o1.b; let c = o1.c; let d = o1.d; let e = o1.e; let f = o1.f; let g = o1.g; let h = o1.h; let i = o1.i; let j = o1.j; let k = o1.k; let l = o1.l; let m = o1.m; let n = o1.n; let o = o1.o; // 'o' is already used as the object name, so renamed to 'o_' let p = o1.p; let q = o1.q; let r = o1.r; let s = o1.s; let t = o1.t; let u = o1.u; let v = o1.v; let w = o1.w; let x = o1.x; let y = o1.y; let z = o1.z; return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z; } function f2() { let { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } = o1; return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z; } function f3() { let [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z] = o2; return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z; } </script>
Tests:
test1
f1();f1();f1();f1();f1();f1();f1();f1();f1();f1();
test2
f2();f2();f2();f2();f2();f2();f2();f2();f2();f2();
test3
f3();f3();f3();f3();f3();f3();f3();f3();f3();f3();