logoalt Hacker News

Insanitytoday at 8:36 PM1 replyview on HN

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.


Replies

afdbcreidtoday at 8:57 PM

Measurement is for micro-optimizations, and it's definitely important. But you should also know the complexity.