@@ -16,18 +16,23 @@ Empirical complexity regression checker: run a target function across input size
1616
1717| Feature | Description |
1818| ---------| -------------|
19- | ** 🧮 Complexity Fitting** | Fits to 9 classes: O(1), O(log n), O(√n), O(n), O(n log n), O(n²), O(n³), O(2ⁿ), O(n!) |
19+ | ** 🧮 Time Complexity** | Fits to 9 classes: O(1), O(log n), O(√n), O(n), O(n log n), O(n²), O(n³), O(2ⁿ), O(n!) |
20+ | ** 📐 Space Complexity** | Classifies memory usage to complexity classes (O(1), O(n), O(n²), etc.) |
21+ | ** 📊 Statistical Significance** | P-values to validate complexity classification |
22+ | ** 🔄 Regression Detection** | Save baselines and detect performance regressions in CI/CD |
23+ | ** 📉 Best/Worst/Avg Cases** | Analyze with sorted, reversed, and random inputs |
2024| ** ✅ Complexity Assertions** | ` @assert_complexity("O(n)") ` decorator for CI/CD testing |
2125| ** 🔍 Bounds Verification** | ` verify_bounds() ` to check if function meets expected complexity |
2226| ** 📊 Confidence Scoring** | Know how reliable your results are |
2327| ** 🔀 A/B Comparison** | Compare two implementations head-to-head |
2428| ** 📄 Report Generation** | Generate markdown reports automatically |
2529| ** 🔧 pytest Plugin** | Integration with pytest for testing |
2630| ** 📈 Plotting** | Optional matplotlib visualization |
27- | ** 💾 Memory Profiling** | Track peak memory usage |
31+ | ** 💾 Memory Profiling** | Track peak memory usage with ` --memory ` flag |
2832| ** 🚀 Auto Size Selection** | Automatically choose optimal input sizes |
2933| ** 📦 Zero Dependencies** | Pure standard library, no numpy required |
3034| ** 💻 CLI-First** | Full command-line interface |
35+ | ** ⚙️ GitHub Actions** | Pre-built CI workflow template |
3136
3237---
3338
@@ -336,17 +341,32 @@ analysis = benchmark_function(
336341
337342---
338343
339- ### 🔟 Memory Profiling
344+ ### 🔟 Memory & Space Complexity
340345
341- Track peak memory usage.
346+ Track memory usage and automatically classify space complexity .
342347
343348``` bash
344349bigocheck run --target mymodule:myfunc --sizes 1000 5000 10000 --memory
345350```
346351
352+ ** Example Output:**
353+ ```
354+ Time Complexity: O(n)
355+ Space Complexity: O(n)
356+
357+ Measurements:
358+ n=1000 time=0.001234s ±0.000001s mem=81,920B
359+ n=5000 time=0.006789s ±0.000005s mem=409,600B
360+ n=10000 time=0.012345s ±0.000012s mem=819,200B
361+ ```
362+
363+ ** Library Usage:**
347364``` python
348365analysis = benchmark_function(my_func, sizes = [1000 , 5000 , 10000 ], memory = True )
349366
367+ print (f " Time Complexity: { analysis.best_label} " )
368+ print (f " Space Complexity: { analysis.space_label} " )
369+
350370for m in analysis.measurements:
351371 print (f " n= { m.size} : { m.seconds:.4f } s, memory= { m.memory_bytes:, } bytes " )
352372```
@@ -442,6 +462,21 @@ from bigocheck import (
442462 VerificationResult,
443463 ComparisonResult,
444464 ConfidenceResult,
465+
466+ # Statistics
467+ SignificanceResult,
468+ compute_significance,
469+
470+ # Regression
471+ Baseline,
472+ RegressionResult,
473+ save_baseline,
474+ load_baseline,
475+ detect_regression,
476+
477+ # Case Analysis
478+ CasesAnalysis,
479+ analyze_cases,
445480)
446481```
447482
@@ -458,9 +493,13 @@ bigocheck/
458493│ ├── assertions.py # Assertions and verification
459494│ ├── compare.py # A/B comparison
460495│ ├── reports.py # Report generation
496+ │ ├── statistics.py # P-values and significance
497+ │ ├── regression.py # Baseline save/load, regression detection
498+ │ ├── cases.py # Best/worst/average case analysis
461499│ ├── datagen.py # Data generators
462500│ ├── plotting.py # Optional plotting
463501│ └── pytest_plugin.py # pytest integration
502+ ├── .github/workflows/ # CI/CD templates
464503├── tests/ # Test suite
465504├── pyproject.toml
466505└── LICENSE
@@ -477,6 +516,7 @@ pytest -v
477516
478517---
479518
519+
480520## 📄 License
481521
482522MIT — see [ LICENSE] ( LICENSE ) .
0 commit comments