Codeflash VS Code Extension

With Codeflash, all the Python code you and your agents write can be always optimal. One-click optimization, automate optimization after every commit, and see optimization progress in real time, and more.
Codeflash does everything that an expert performance engineer would do to find optimizations. It profiles your code, generates multiple optimization ideas, generates tests, and finds the fastest code that is correct and safe to merge.
Features
- ⚡ One-Click Optimization - Find AI-generated optimizations easily with CodeLens hints
- 📊 Real-time Progress - Track optimization progress with detailed status updates
- ✨ Inline Optimization Suggestions - See optimization opportunities directly above function definitions
- 🎯 Smart Function Detection - Automatically identifies optimizable Python functions
- 🔄 Git Integration - Optimize only changed functions with "Optimize Changed Functions"
- 🎨 Clean Interface - Keeps you in the flow, finds optimizations in the background and stays out of your way until it finds and optimization.
Requirements
- Python 3.9+
- Git repository (required)
- VS Code 1.94.0+
Quick Start
- Install the Codeflash extension from the Extension Marketplace
- Follow the installation flow to initialize Codeflash
- Open a Python file - Codeflash activates automatically
- See
optimize suggestions appear above optimizable functions
- Click to optimize or use the sidebar to manage optimizations
Usage
Inline CodeLens
# optimize <- Click to optimize
def slow_function(data):
result = []
for item in data:
if item in [1, 2, 3, 4, 5]:
result.append(item * 2)
return result
Key Workflow
- Code normally - Write and modify Python functions
- See suggestions - Codeflash shows optimization opportunities
- Optimize selectively - Choose which functions to improve
- Track progress - Monitor optimizations in the sidebar
- Review changes - View diffs and apply improvements
Documentation
📖 Complete Documentation: https://docs.codeflash.ai/
Key Resources:
Troubleshooting
Extension won't activate?
- Ensure you've run
codeflash init in your project
- Verify Git repository exists (
.git folder)
- Check Python 3.9+ is installed and in PATH
No functions showing?
- Open a
.py file with functions
- Wait for analysis to complete
- Check VS Code Output → Codeflash for errors
Need help?