key access

Benchmark created on


Setup

let LOC = "_btns"

let c = {
	_btns: [{name: 'test'}]
}


Test runner

Ready to run.

Testing in
TestOps/sec
prop from function scope
function t(){
	if(c._btns[0].name == 'test'){}
}

t()
ready
key from function scope
function u(){
	if(c[LOC][0].name == 'test'){}
}

u()
ready
prop
if(c._btns[0].name == 'test'){}
ready
key
if(c[LOC][0].name == 'test'){}
ready
double scope
function u(){
	function y(){
		if(c[LOC][0].name == 'test'){}
	}
	y()
}

u()
ready

Revisions

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