Test name | Executions per second |
---|---|
Basic | 12729796.0 Ops/sec |
Proxy | 481628.5 Ops/sec |
Proto | 8772968.0 Ops/sec |
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})
let a = basic.a;
let b = basic.b;
let a = proxy.a;
let b = proxy.b;
let a = proto.a;
let b = proto.b;