UMN CDMS Wiki archive
start › py_root_timing

Timing Python vs ROOT

The Python code via the uproot package is much slower than ROOT. Below are some benchmark details for series with various lengths. These benchmarks involve two plots – the first time listed for Python and ROOT is for generating the first plot, and the second time listed is the additional time to generate a second plot.

series data collection time # of events python benchmark time additional python benchmark time for extra plot root benchmark time root benchmark time with Tcanvas already created
07220706_2041 6 min 17553 10 seconds 0.26 seconds 7.7 seconds 4.4 seconds
07220703_2012 90 min 27543 2 minutes 12 seconds 0.24 seconds 7.9 seconds 4.0 seconds
07220703_2151 360 min 101816 9 minutes 26 seconds 0.24 seconds 9.7 seconds 5.3 seconds
07221001_2314 3122 min 10000000 2 hours 19 minutes 0.87 seconds 4 min 14 sec 1 min 32 sec

In the meeting, I mentioned that I was getting performance warnings from one of the libraries. However, I cannot replicate this issue anymore. I think this only happens on the old version of the code and is now solved.

PyROOT testing: https://github.com/hneog/testing/blob/main/benchmarking_timing_PyROOT.ipynb