I am using root_numpy / uproot to work with a ROOT file (containing about 8 million events). I understand that uproot is only fast provided large Tbasket sizes, however, I am looking at a branch where the TBasket size is about 50kB, and to read the branch, uproot takes 70 sec, while root_numpy only takes 45 sec, which is puzzling since I would expect exactly the reverse. Does anyone have any suggestions as to what is going wrong here, and how I can fix it?
Here is my uproot code:
ttree = uproot.open(file)["TTree"]
array = ttree.array("Branch")
And here is my root_numpy code:
tfile = ROOT.TFile(file,"OLD")
ttree = tfile.Get("TTree")
array = root_numpy.tree2array(ttree,branches="Branch")