Trie#key performance improvements