If the slice has no order, then you are stuck with linear search, which is O(n). If it is sorted, you can do it in O(log(n)) with a binary search. That’s assuming you have no decision over the data structure and how it gets populated.

But the hash has to be calculated. Most efficient version, especially if the set is dynamic, a prefix tree might be the most efficient thing, runtime at least.

It’s runtime depends on the length of the word to search. It’s memory overhead might be more than gos native maps though…