Object vs Proxy 3

Benchmark created on


Description

Showing the massive overhead of proxies even with no traps.

Setup

// Let's even disregard the cost of initializing the object to be proxied from the proxy's time
const objToProxy = { x: 5 };

Test runner

Ready to run.

Testing in
TestOps/sec
Object
({ x: 5 });
ready
Proxy
(new Proxy(objToProxy, {}));
ready

Revisions

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