Direct and inherited fields (v2)

Revision 2 of this benchmark created on


Description

Multiplying with a field declared directly on a class and a field inherited from another class.

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.