Hacker News new | ask | show | jobs
Show HN: A Python time and space complexity reference (pythoncomplexity.com)
3 points by heikkitoivonen 134 days ago
Hi HN, I built this while doing a lot of LeetCode-style Python problems.

I ran into a case where I used a Python stdlib class but couldn’t confidently state its time or space complexity. The official docs didn’t mention it. When I asked in Python discussion forums whether complexity should be documented, the response was mixed.

I originally assumed a comprehensive reference would take too much manual effort, but realized that coding agents could help bootstrap it by extracting and summarizing information from the documentation and CPython source code.

To reduce errors, I had multiple agents (using different models) independently check the same sections and compare their results. The project is open source, so the idea is that remaining inaccuracies can be corrected over time.

I’d appreciate feedback on missing cases, incorrect assumptions, or whether this is useful in real Python work.

https://pythoncomplexity.com/