There is a newer version of the record available.

Published January 30, 2026 | Version v2.1.2
Software Open

Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python

Description

What's Changed

Bug Fixes

  • Fix Windows CPU profiling extreme slowness and memory explosion (#992): The v2.1 Windows timer loop hardcoded a 1ms sampling interval regardless of the configured rate (default 10ms), generating ~10x more samples than intended and reducing sys.setswitchinterval to 1ms causing excessive GIL contention. Now uses the actual configured sampling rate.

Improvements

  • Bound memory footprint samples with reservoir sampling (#993): Replace unbounded list accumulation of memory footprint samples with sorted_reservoir (Vitter reservoir sampling), capping memory at O(k) instead of O(n) where n is the number of malloc/free events. Eliminates unbounded memory growth during long profiling runs.

Full Changelog: https://github.com/plasma-umass/scalene/compare/v2.1.1...v2.1.2

Notes

If you use or refer to Scalene, please cite it as below.

Files

plasma-umass/scalene-v2.1.2.zip

Files (9.1 MB)

Name Size Download all
md5:e04aa67f84d28881492378312ea14c3f
9.1 MB Preview Download

Additional details

Related works