port some high performance of hash algorithms

port some high performance of hash algorithms