Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0
Firefox 125
Ubuntu
Desktop
7 months ago
Test name Executions per second
Basic 1323098624.0 Ops/sec
Proxy 45185088.0 Ops/sec
Proto 1326858880.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;