the strlen can be optimized by checking if any of the Nth chars is null , where N is constant for sizeof (return_type), in theory this hash have less collisions, but right now we have no reproducible collisions in the current string hashing algorithm used.
original code from https://github.com/facebookarchive/warp
in C would be something like:
the strlen can be optimized by checking if any of the Nth chars is null , where N is constant for sizeof (return_type), in theory this hash have less collisions, but right now we have no reproducible collisions in the current string hashing algorithm used.