Merge branch 'hash_optimisations' into wip