add hash encoding, benchmark