Python 168ms-beat-100% solution
class WordDictionary(object):\n        def __init__(self):\n            self.word_dict = collections.defaultdict(list)\n            \n    \n        def addWord(
    class WordDictionary(object):\n        def __init__(self):\n            self.word_dict = collections.defaultdict(list)\n            \n    \n        def addWord(self, word):\n            if word:\n                self.word_dict[len(word)].append(word)\n    \n        def search(self, word):\n            if not word:\n                return False\n            if '.' not in word:\n                return word in self.word_dict[len(word)]\n            for v in self.word_dict[len(word)]:\n                # match xx.xx.x with yyyyyyy\n                for i, ch in enumerate(word):\n                    if ch != v[i] and ch != '.':\n                        break\n                else:\n                    return True\n            return False\n\nThe search function could be done in a more pythonic way, but I see that performance has suffered so I just wrote the raw logic by myself.
[]