linear search is never faster assuming your hash algorithm is cheap enough. However, if your list only contains 2 items, then your hash algorithm better be "Is first character > 'm'".
When you want real speed like this and are happy with insane complexity, code that writes and self-compiles a hash function based on the data can make sense.
When you want real speed like this and are happy with insane complexity, code that writes and self-compiles a hash function based on the data can make sense.