Object

Benchmark created on


Setup

const someTest = () => {}

const getConfig = () => {
	const define = {
		test: [
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
		],
		another: [
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
		],
		some: [
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
		]
	}

	return define.test
}

const getConfigSwitch = () => {
	switch('test') {
		case 'test':
		  return [
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
		]
		case 'hehe':
		  return [
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
		]
		default:
			return [
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
			{hello: 'hello', someTest, test: async () => false},
		]
	}
}

Test runner

Ready to run.

Testing in
TestOps/sec
Switch
getConfigSwitch()	
ready
get config
getConfig()	
ready

Revisions

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