I\'m trying to implement a compact trie to use as a dictionary in my LZ78 implementation. However inserting elements into the trie is very slow with my current naive implementat