<html><body><div>Hi,</div><div><br data-mce-bogus="1"></div><div>I wonder whether there is already a way in Swift to compare a string against a large string array quickly without using the traditional ways of comparison. <br><br>Say we&nbsp;have ["a", "b", "c", "d"] and we would like to find whether this array contains "a", then we decide to check if we have "b" in that same array. Don't you think there is a way to represent the array in a different way and make this comparison a lot quicker ?<br><br>I know there are recurrent neural networks etc ... I am talking here about solution without learning anything, just representing the array&nbsp;differently so we can minimize that O(N).<br><br>I have developed an algorithm and it is doing pretty well so far and I wonder whether it would be accepted so I came to propose and see if this is interesting from your perspective.<br><br>I developed a Javascript version here&nbsp;<a href="https://omarshariffathi.github.io/quickhint/">https://omarshariffathi.github.io/quickhint/</a><br><br>If you think this is welcome in Swift Foundation I am ready for a pull request.<br>Thanks for reading.</div></body></html>