I don't know much at all about performance. But, if someArray.includes(someString)
has to search the whole array, would trying to find an index of an object be more direct (and thus faster, and also a bit less code)?
// create an array of number strings
const arr = Array(100).from(n => n.toString());
// find whether a string is in the array
const isStringInArr_includes_true = arr.includes("50"); // true
const isStringInArr_includes_false = arr.includes("500"); // true
// instead of creating an array, create an object with the array items as keys
// EDIT: actually you can just use the array itself
// and look up the string as a key
const isStringInArr_lookup_true = !!arr["50"]; // !!("50") === true
const isStringInArr_lookup_false = !!arr["500"]; // !!(undefined) === false
Obviously this would only work with an array of strings.