removed uneccessary allocations to speed up trie compression