Object instantation

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Using a class
class MyClass {
	constructor(a, b) {
		this.a = a;
		this.b = b;
	}
}

const myInstance = new MyClass(2, 3);
ready
Using an object literal
const myObj = { a: 2, b: 3 }
ready

Revisions

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