Hacker News 👾
Назад к новостям
1
gadwant18.01.26 07:45

Bigocheck: Empirical complexity analysis for Python (Zero Ops)

Источник
Комментарии
1

gadwant
18.01.26 07:45

Bigocheck is a zero‑dependency tool for empirical Big‑O complexity analysis in Python. It runs your Python function across different input sizes, measures runtime and memory usage, and fits the results against common complexity classes. The project ships as both a library and a CLI and focuses on being “zero‑ops” — you can pip install bigocheck and start profiling without extra dependencies.Key features:Time complexity: fits results to nine complexity classes (O(1), O(log n), O(n), O(n log n), O(n²), O(n³), O(2ⁿ), O(n!)) and can detect arbitrary polynomial O(n^k) terms.Space complexity: classifies memory usage into complexity classes.Git commit tracking & regression detection: track complexity across commits and detect regressions.Instability detection: detect noisy/unreliable benchmarks; supports confidence scoring and p‑values to validate results.Badge & report generation: create SVG badges for READMEs and generate HTML/Markdown reports automatically.Jupyter/CI integration: rich HTML displays in notebooks, optional Matplotlib plotting, CSV/JSON export, and integration with pytest and GitHub Actions.Benchmark options: specify sizes, trials, warmup runs, best/worst/average cases, async functions, amortized analysis, parallel benchmarking, and A/B comparison of two implementations.User‑friendly CLI: full command‑line interface (bigocheck run, bigocheck regression, bigocheck repl, etc.) with an optional REPL for quick analysis.Bigocheck is released under the MIT license on GitHub and is available on PyPI. Feedback, bug reports, and contributions are welcome!https://pypi.org/project/bigocheck/https://github.com/adwantg/bigocheck