Changes in HashedDoc* to make them faster
Merge pull request #1705 from van51/feature/faster_quadratic

Changes in HashedDoc* to make them faster