plasma-umass/scalene

Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python with AI-powered optimization proposals

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 60 minutes ago
Added to GitGenius on September 4th, 2026
Created on December 17th, 2019
Open Issues & Pull Requests: 153 (+0)
GitHub issues: Enabled
Number of forks: 437
Total Stargazers: 13,497 (+0)
Total Subscribers: 85 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Scalene is a Python profiler that measures CPU, GPU, and memory performance with AI-powered optimization suggestions.

Scalene addresses the need for detailed performance analysis across multiple resource types in Python programs. Traditional profilers often focus on a single dimension and run slowly, obscuring the actual bottlenecks in real code. Scalene operates orders of magnitude faster than many alternatives while simultaneously tracking CPU usage, GPU activity, and memory allocation. It distinguishes between time spent in Python versus native code, and between memory allocated by the Python interpreter versus external libraries. The tool's defining feature is its integration of AI-powered optimization proposals: developers can request suggested improvements for specific lines or code regions, with the system supporting multiple AI providers including OpenAI, Microsoft Azure, Amazon Bedrock, and local models via Ollama.

Scalene suits developers working on computationally intensive Python applications who need to understand where resources are actually being consumed. It is particularly valuable for projects involving GPU computation or heavy memory usage, where traditional single-dimension profilers provide incomplete information. The tool works both as a command-line utility and as a Visual Studio Code extension, making it accessible within existing development workflows. A web-based interface is also available for visualization and interaction with profiling results.

The project maintains active development with regular updates addressing new features and improvements. The codebase shows ongoing refinement of profiling accuracy and expansion of supported AI providers for optimization suggestions. Development activity reflects responsiveness to user needs and continued investment in the tool's core capabilities.