Get the latest tech news
Low Overhead Allocation Sampling with VMProf in PyPy's GC
Introduction There are many time-based statistical profilers around (like VMProf or py-spy just to name a few). They allow the user to pick a trade-off between profiling precision and runtime overhead
If sampling is turned off, the slow path in collect_and_reserve has three extra instructions for the if at the beginning, but are only a very small amount of overhead, compared to doing a minor collection. The nursery usually has a size of a few megabytes, but profiling long-runningor larger applications with tons of allocations could result in very high number of samples per second (and thus overhead). In a future blog post, we are going to dive into the actual usage of allocation sampling with VMProf, and show an example case study.
Or read this on Hacker News