Tests:
  • Assign

    x
     
    const obj = {a: { value: true, d: { hello: true } }, b: true, c: 'hello' };
    const a = obj.a;
    const b = obj.b;
    const c = obj.c;
    const d = a.d;
    console.log(a);
    console.log(b);
    console.log(c);
    console.log(d);
  • Destructure

     
    const obj = {a: { value: true, d: { hello: true } }, b: true, c: 'hello' };
    const {a, b, c} = obj;
    const { d }     = a;
    console.log(a);
    console.log(b);
    console.log(c);
    console.log(d);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Assign
    Destructure

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Safari/605.1.15
Safari 11 on Linux
View result in a separate tab
Test name Executions per second
Assign 55649.1 Ops/sec
Destructure 62782.1 Ops/sec