19 ms·
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 (pyt
by Insanity 6d ago
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.
- afdbcreid 6d agoMeasurement is for micro-optimizations, and it's definitely important. But you should also know the complexity.