github plasma-umass/scalene v2.1.2

11 hours ago

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: v2.1.1...v2.1.2

Don't miss a new scalene release

NewReleases is sending notifications on new releases.