Generally for performance, the rule is you _measure_ it, you don't rely on big-O. So if you're really concerned, please just use a profiler.
Also hashmaps (python Dicts) have amortized O(1) and not O(1) big-O.
Measurement is for micro-optimizations, and it's definitely important. But you should also know the complexity.
Measurement is for micro-optimizations, and it's definitely important. But you should also know the complexity.