You're not considering the complexity of the search it's having to make. I don't know exactly how efficient or 'intelligent' the matching code is for wildcards but it's entirely possible that it's performing thousands of searches for each item in order to make or rule out a match. The speed of accessing the hash table (or even a file) is negligable compared to the processing time required to match.