improve hash allocation code, hopefully faster