I need a fast way to find if a string is in a set of strings.
My set does not change much over time, so putting it in a sorted array and using binary search is an option (as advised here: fastest way to determine if an element is in a sorted array)
But would using a trie be faster considering we are talking about String ? If so, is there a well known and supported implementation I could use ? (found a few one on github, but did not seem supported or broadly used).
I was also reading: Fast way to find if a string is in an array
Any chance this approach could beat using a trie ?
(I do not have the time to try to implement all the approaches and benchmark them.)