Getter vs Raw Access (v2)

Revision 2 of this benchmark created on


Setup

class Foo {
	direct = 0;
	get indirect() {
		return this._indirect;
	};
	set indirect(x) {
		this._indirect = x;
	}
	_indirect = 0;
}

let foo = new Foo;

Teardown

foo = new Foo;

Test runner

Ready to run.

Testing in
TestOps/sec
Indirect
foo.indirect = foo.indirect * 2
ready
Direct
foo.direct = foo.direct * 2
ready

Revisions

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