For a plain lookup, usually not. Hashing a string already reads every character of it, so both are O(length), but the hash map does one probe into a contiguous table while the trie does a pointer chase per character, each one a likely cache miss. A node that holds a fixed array of 26 children also costs 208 bytes of pointers on a 64-bit machine, or half that on a JVM with compressed references, whether those children exist or not, and near the leaves almost all of them are empty. The trie earns its place only when you need prefixes or sorted order, which a hash map cannot give you at any price.