test get key value from object

Benchmark created on


Setup

const testObject = {
	a: 1,
	b: 2
};

Test runner

Ready to run.

Testing in
TestOps/sec
Reflect
let a = "a";

let getA = Reflect.get(testObject, a);
ready
optional
let getA = testObject?.["a"];
ready

Revisions

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