What does HackerNews think of scalene?
Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python
Language:
JavaScript
#61
in
Python
From presentation for best paper at OSDI '23 https://www.usenix.org/conference/osdi23/presentation/berger
If you think the Simpsons should not be generously featured in an academic presentation, avoid this presentation.
Slideshow is very long but worthy of a quick browse because
a) good examples on how much 'fatter' python is vs c++ (eg: slide 29)
b) shows Scalene improving performance (eg: 90x slide 111)
You're probably doing some unnecessary data movement. Using a modern profiler like scalene might point out where some improvements are possible: https://github.com/plasma-umass/scalene
You should take a look at Scalene - it's even better.
If you're interested in profiling, you should check out scalene. It's leaps ahead of every other profiling tool I've used in python and honestly might be the best profiler I've used in any language. It will give you per line results for mem, cpu, and gpu, tell you c time vs python time (numpy calls, etc), and it's faster than most other python profilers.
https://github.com/plasma-umass/scalene check out scalene!
I haven't tried it yet, but Scalene looks interesting: https://github.com/plasma-umass/scalene.
For folks looking for a good modern profiling tool for Python codebases: my current favourite is Scalene [0], which allows profiling CPU/GPU and memory usage in a performant way. The author gave a talk about it on last PyCon US [1].
[0]: https://github.com/plasma-umass/scalene [1]: https://www.youtube.com/watch?v=nrQPqy3YY5A