The hashing function used lambdas, which are expensive. Removing them
and relying on core functions offers a speed up.