When we add CollatorInterface* to ArraySet, two things happen:
1. To calculate hash of string, we will generate a collation key and hash it instead of a raw string. There is no obvious way around it, as it is the best way to get collation-aware hash of a string.
2. When comparing strings, we will compare them according to the given CollatorInterface.
Generating collation key is expensive operation AND comparing strings with collation is more expensive than just byte-wise compare.
It leads to linear lookup being faster for up to 50 elements in hash set.
We can try to speed it up by using generated collation keys for byte-wise compare instead of doing string compare with collation.