Proxy

Benchmark created on


Setup

class Foo {
	doSomething() {}
}

const foo = new Foo()
const proxy1 = new Proxy(foo, {
	get(target, prop) {
		return Reflect.get(target, prop)
	}
})
class FooProxyHandler {
	get(target, prop) {
		return Reflect.get(target, prop)
	}
}
const proxy2 = new Proxy(foo, new FooProxyHandler())

Test runner

Ready to run.

Testing in
TestOps/sec
1
foo.doSomething()
ready
2
proxy1.doSomething()
ready
3
proxy2.doSomething()
ready

Revisions

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