I am learning how to pass messages upon input triggers and in the on_input() function I am instructed to use the hash function to hash the action_id i am targeting:
if action_id == hash(“actionName”)
then do stuff…
I am wondering if the hash function actually hashes the string in place or performs a table lookup
If it is the former, then because the string is static I could just define the hashes as local constants and the hash function will only be called once.
If it is the later then is the hash table lookup performed using binary search or something?
Just trying to make my game as efficient as possible.