Implement some sort of hashing that the longer functions can use. This might be unnecessary, the search only takes a few seconds anyway.