Optimal way to iterate over few set of keys

These are 256-bit hashes