worstcase-analyzer | vs code extension
Automatically compute and display time and space complexity for JavaScript, TypeScript, JSX, and TSX code as you type in VS Code.
Features
- Automatic Complexity Analysis:
- Analyzes your JavaScript, TypeScript, JSX, and TSX files for time and space complexity using static analysis.
- Results are shown as inline decorations at the end of relevant lines (e.g., loops, function calls, conditionals).
- Live Feedback:
- Complexity is updated automatically as you edit your code.
- Language Support:
- Only activates for supported language modes: JavaScript, TypeScript, JavaScript React (JSX), and TypeScript React (TSX).
Example

Relevant lines will show decorations like:
for (let i = 0; i < n; i++) { // space: O(1), time: O(n)
Requirements
No special requirements. The extension works out of the box for supported file types.
Extension Settings
This extension does not add any custom settings yet.
Known Issues
- Only works for JavaScript/TypeScript/JSX/TSX files.
- Decorations may not appear for very large files or if VS Code disables them for performance.
Release Notes
0.0.1
- Initial release: automatic time and space complexity analysis for JS/TS/JSX/TSX with inline decorations.
Enjoy!
| |