Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.10
Desktop
2 years ago
Test name Executions per second
Basic 12729796.0 Ops/sec
Proxy 481628.5 Ops/sec
Proto 8772968.0 Ops/sec
Script Preparation code:
AخA
 
window.basic = {a : 1, b: 2};
window.proxy = new Proxy({a : 1, b: 2}, {get : (t, p) => t[p]})
window.proto = Object.setPrototypeOf({}, {a : 1, b: 2})
Tests:
  • Basic

     
    let a = basic.a;
    let b = basic.b;
  • Proxy

     
    let a = proxy.a;
    let b = proxy.b;
  • Proto

     
    let a = proto.a;
    let b = proto.b;