smallHash: simplified and improved performance

Unchanged behaviour
Merge pull request #145 from Alkarex/patch-1

smallHash: simplified and improved performance