Profiling.sampling – Statistical Profiler
docs.python.org
Profiling.sampling – Statistical Profiler
1–10 of 26 posts
Re: Profiling.sampling – Statistical Profiler
#2Re: Profiling.sampling – Statistical Profiler
#3Re: Profiling.sampling – Statistical Profiler
#4Re: Profiling.sampling – Statistical Profiler
#5Re: Profiling.sampling – Statistical Profiler
#6I'm not trying to criticize, but Python is known to be much slower than eg. Java or Go etc. So for performance-critcal code, why use Python? I find Python to be very good because it is concise and simple, but I have not used it for production so far.
Sometimes Python is just the language used in the domain. Lots of sciences live on Python because it is easy to teach to grad students and the package ecosystem is strong.
Re: Profiling.sampling – Statistical Profiler
#7I'm not trying to criticize, but Python is known to be much slower than eg. Java or Go etc. So for performance-critcal code, why use Python? I find Python to be very good because it is concise and simple, but I have not used it for production so far.
Re: Profiling.sampling – Statistical Profiler
#8What I like about profiling.tracing is how you can control it in the same code base that you are profiling. That turns tracing into a feature you can ship, not just a tool you can attach. Profiling.sampling doesn't seem to provide anything similar, it has to run as a separate process
Re: Profiling.sampling – Statistical Profiler
#9I'm not trying to criticize, but Python is known to be much slower than eg. Java or Go etc. So for performance-critcal code, why use Python? I find Python to be very good because it is concise and simple, but I have not used it for production so far.
Re: Profiling.sampling – Statistical Profiler
#10This sounds a lot like py-spy. How does it compare?
One thing to note is that there are some differences in blocking behaviour of the target process. Py-spy blocks by default and profiling.sampling doesn't. I wrote a bit about why py-spy blocks by default here https://www.benfrederickson.com/why-python-needs-paused-duri... - the first version of py-spy also didn't block and since we got incredibly misleading results at times this was one of the first changes I made to py-spy