Direct and inherited fields

Benchmark created on


Setup

class ValueHaver {
	constructor(value) {
		this.value = value
	}
}

class Inheritor extends ValueHaver {
	constructor(value) {
		super(value)
	}
}

const valueHaver = new ValueHaver(24)
const inheritor = new Inheritor(24)

Test runner

Ready to run.

Testing in
TestOps/sec
Direct field
valueHaver.value * 2;
ready
Inherited field
inheritor.value * 2;
ready

Revisions

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