Scalene: A high-performance, high-precision CPU, GPU, memory profiler for Python
112 points
11 hours ago
| 4 comments
| github.com
| HN
infocollector
6 hours ago
[-]
I've used Scalene at various times in the past few years, and always liked using it when I want to dig deeper compared to cProfile/profile. You might also want to look at:

1] https://github.com/joerick/pyinstrument

2] https://github.com/benfred/py-spy

3] https://github.com/P403n1x87/austin

4] https://github.com/bloomberg/memray

5] https://github.com/pyutils/line_profiler

reply
1st1
6 hours ago
[-]
For profiling memory consider far more advanced memray.

https://github.com/bloomberg/memray

reply
Loranubi
5 hours ago
[-]
Note: The Windows version currently only supports CPU and GPU profiling, but not memory or copy profiling.

That's a problem with many of the profiling tools around Python. They often support Windows badly or not at all.

reply
solarkraft
4 hours ago
[-]
Isn’t the modern Windows runtime just Linux anyway?
reply
emeryberger
2 hours ago
[-]
(Scalene author here) Nope, but WSL2 (Windows Subsystem for Linux) is, and Scalene works great with it.
reply
kristianp
9 hours ago
[-]
This profiler was mentioned in the context of rewriting js tools in faster languages here:

https://lobste.rs/s/ytjc8x/why_i_m_skeptical_rewriting_javas...

The rewrite discussion is here: https://news.ycombinator.com/item?id=41898603

reply
tomrod
7 hours ago
[-]
Oh! Lobsters is neat!
reply