Profiling.sampling – Statistical Profiler | Hacker News
TL;DR AI
2 min readKey summary
Hacker News commenters discussed Profiling.sampling, a new statistical profiler for Python, and how it compares with tracing-based profilers.
The thread focused on profiling tradeoffs: sampling can reveal hotspots with less runtime overhead, while tracing is more detailed but heavier.
Commenters argued that Python is often chosen for productivity, ecosystem depth, or as glue around faster code, not for raw speed.
The debate also covered when to optimize Python code directly versus moving critical paths to Cython, C, Rust, or other faster components.



