es6-对象解构语法

Benchmark created on


Setup

const obj = { a: 1, b: 2, c: 3, d: 4, e: 5 };  
let a, b, c, d, e;

Test runner

Ready to run.

Testing in
TestOps/sec
对象解构赋值
({ a, b, c, d, e } = obj);
ready
普通赋值
a = obj.a;
b = obj.b;
c = obj.c;
d = obj.d;
e = obj.e;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.