Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0
Firefox 111
Ubuntu
Desktop
one year ago
Test name Executions per second
Object destructuring 91013200.0 Ops/sec
Property picking 1366247424.0 Ops/sec
Tests:
  • Object destructuring

    x
     
    const obj = {
      a:1,
      b:1,
      c:1,
      d:1,
      e:1,
      f:1,
      g:1,
      h:1,
      i:1,
    }
    const {a, d, i} = obj;
    const n = {a, d, i};
  • Property picking

     
    const obj = {
      a:1,
      b:1,
      c:1,
      d:1,
      e:1,
      f:1,
      g:1,
      h:1,
      i:1,
    }
    const n = {a: obj.a, d: obj.d, i: obj.i};