Array destructure

Benchmark created on


Setup

const useState = function() {
	return [1, 2];
}

Test runner

Ready to run.

Testing in
TestOps/sec
Get by array index
const state = useState();
const currState = state[0];
const setState = state[1];
ready
Destructure
const [state,setState] = useState();
ready

Revisions

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