Set.has vs String.includes on Single character

Benchmark created on


Setup

const _str = "(),.=*#>~+:\"\'[] \t\r\n";
const _set = new Set("(),.=*#>~+:\"\'[] \t\r\n")

Test runner

Ready to run.

Testing in
TestOps/sec
str
_str.includes('a');
ready
set
_set.has('a')
ready

Revisions

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