ComplexityLens
AI-powered Python complexity analyzer for VSCode. See Big-O notation instantly as you code.
Features
- Instant complexity preview: Select code → see
⚡ O(n²) appear inline
- AI-powered analysis: Detailed breakdown with bottlenecks and optimization suggestions
- Smart caching: Reuses results for identical code
- Works offline: Falls back to heuristics when API is unavailable
Installation
From .vsix file:
- Download
complexity-lens-0.0.1.vsix from Releases
- Open VSCode
- Press
Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
- Type "Extensions: Install from VSIX"
- Select the downloaded file
From Marketplace:
Search for "ComplexityLens" in VSCode Extensions
Setup
- Get an Anthropic API key from console.anthropic.com
- Open VSCode Settings (
Cmd+, or Ctrl+,)
- Search for "Complexity Lens"
- Paste your API key in "Complexity Lens: Api Key"
Usage
- Open a Python file
- Select any code snippet
- See instant
⚡ O(n) preview appear next to your selection
- Press
Cmd+Shift+C (Mac) or Ctrl+Shift+C (Windows/Linux) for detailed analysis
Examples
Binary Search
| |