Upstream merge
Improve LongHash performance.
Revert "Improve LongHash performance."

This reverts commit 1705259934d5f77023262faea844c3847d3a1f2f.
Improve LongHash performance - take #2
Improve lsw too
Revert LongHash changes