map vs not map

Benchmark created on


Setup

const action = {
	type: "[Tasks] Do A Thing"
}

const sidePanelActions = [
	{
		type: "[Side Panel] One Thing"
	},
	{
		type: "[Side Panel] Two Thing"
	}
]

Test runner

Ready to run.

Testing in
TestOps/sec
includes
action.type.includes("[Side Panel]");
ready
map
sidePanelActions.map(action => action.type).includes(action.type);
ready

Revisions

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