Object vs Proxy

Benchmark created on


Description

Showing the massive overhead of proxies even with no traps.

Setup

const obj = { x: 5 };
const proxy = new Proxy({ x: 5 }, {});

Test runner

Ready to run.

Testing in
TestOps/sec
Object
obj.x;
ready
Proxy
proxy.x;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.