I want to use uproot to open a tree, then implement in a for loop function using numba, but it seem to have some problem with pipeline in numba. What is the exact way to accelerate for loop in python when the for loop has root tree or branches in it?
the ROOT way to accelerate your Python analysis is RDataFrame, see also the Python tutorials here: ROOT: Dataframe tutorials . It does require to restructure your logic in a way that removes the explicit for loop over events though. But I think the same goes for uproot, typically. Large for loops and Python don’t mix well in terms of performance, and numba alone might not be able to “digest” (i.e. to jit) all the complexity of a HEP analysis.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.