This repository hosts a couple of small benchmark based on a TTree
reading
in order to compare performances of go-hep and ROOT.
In these test, fake data are generated, with 30 branches of either floats or slices
(slice size varies between 1
and n=30
). The test consists in loading all the branches and computing
three sums (involving all values of all branches). One can regenerate the fake data with:
$> go run ./gen-data.go
The following table shows the time (milliseconds per 10k events) for different codes, using the exact same input file, both for ROOT (left) and go-hep (middle), as well as the ratio between go-hep and the ROOT branch approach (right):
Root | go-hep | go-hep / branch | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
In this test, 42 float branches are loaded for 720k events (contact me if you want to access the input file).
GOHEP
b5f3896
: 1.6 ms/kEvt (1.1 s for 720 kEvts)839f662
: 4.5 ms/kEvt (3.3 s for 720 kEvts)feb48b1
: 5.2 ms/kEvt (3.7 s for 720 kEvts)
ROOT
- 2.6 ms/kEvt (1.9 s for 720 kEvts)