scalene logo

scalene

plasma-umass/scalene

High-performance CPU, GPU, and memory profiler for Python with AI-powered optimization

GraphCanon updated 2w · GitHub synced 2w

13k stars435 forksLast push 3w Python Apache-2.0

Decision brief

Scalene is a high-performance CPU, GPU, and memory profiler for Python that uses AI to suggest optimizations.

Good fit when

  • When you need precise profiling of both CPU and GPU performance in Python applications
  • For optimization suggestions powered by artificial intelligence

Avoid when

  • If your project does not involve Python, as Scalene is specific to this language
  • Avoid if your system lacks necessary dependencies like Visual C++ Redistributable on Windows

Observed Jul 17, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Very active (2d since push)
As of 2w
Provenance
Not a fork · Organization account
As of 2w
Security (OSV)
18 low (18 low)
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install scalene
PyPI

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

Scalene profiles the performance of Python programs on CPUs and GPUs, offering precise profiling with suggestions for optimization.

Capability facts

CLI
CLI entrypoint

Source: pyproject.toml:[project.scripts] · Aug 4, 2026

Languages
python

Source: github.language+pyproject.toml · Aug 4, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Aug 4, 2026)

python3 -m pip install -U scalene
Source link
Works with VS CodeVS Code

Source: README excerpt (regex_v1, Aug 4, 2026)

Using the Scalene VS Code Extension:
Source link

Tags

README

Quick Start

Installing Scalene:

python3 -m pip install -U scalene

or

conda install -c conda-forge scalene

Using Scalene:

After installing Scalene, you can use Scalene at the command line, or as a Visual Studio Code extension.

Using the Scalene VS Code Extension:

First, install the Scalene extension from the VS Code Marketplace or by searching for it within VS Code by typing Command-Shift-X (Mac) or Ctrl-Shift-X (Windows). Once that's installed, click Command-Shift-P or Ctrl-Shift-P to open the Command Palette. Then select "Scalene: AI-powered profiling..." (you can start typing Scalene and it will pop up if it's installed). Run that and, assuming your code runs for at least a second, a Scalene profile will appear in a webview.

Screenshot 2023-09-20 at 7 09 06 PM
Commonly used command-line options:

Scalene uses a verb-based command structure with two main commands: run (to profile) and view (to display results).


---

## Installation

<details open>
<summary>Using <code>pip</code> (Mac OS X, Linux, Windows, and WSL2)</summary>

Scalene is distributed as a `pip` package and works on Mac OS X, Linux (including Ubuntu in [Windows WSL2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-index)) and Windows platforms.

> **Note for Windows users**
>
> Starting with Scalene 2.0, Windows supports full memory profiling. If you
> encounter issues, ensure you have the [Visual C++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe)
> installed. If building from source, you will need Visual C++ Build Tools and CMake.
>

You can install it as follows:
```console
  % pip install -U scalene

or

  % python3 -m pip install -U scalene

You may need to install some packages first.

See https://stackoverflow.com/a/19344978/4954434 for full instructions for all Linux flavors.

For Ubuntu/Debian:

  % sudo apt install git python3-all-dev
Using conda (Mac OS X, Linux, Windows, and WSL2)
  % conda install -c conda-forge scalene

Scalene is distributed as a conda package and works on Mac OS X, Linux (including Ubuntu in Windows WSL2) and Windows platforms.

Note for Windows users

Starting with Scalene 2.0, Windows supports full memory profiling. If you encounter issues, ensure you have the Visual C++ Redistributable installed.

On ArchLinux

You can install Scalene on Arch Linux via the AUR package. Use your favorite AUR helper, or manually download the PKGBUILD and run makepkg -cirs to build. Note that this will place libscalene.so in /usr/lib; modify the below usage instructions accordingly.

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.