Faster alternative to hadd

Dear all!

I need to merge root files that have a lot of histograms and
directories. hadd was too slow for me so I put together an alternative
under the name of fhadd (fast hadd). It trades of speed vs memory
otherwise it behaves quite like the regular hadd.

If you are interested you can give it a try. You can find it here:


A quick comparison to hadd can be started like this:

source /afs/

fhadd is faster by a factor 4. It heavily depends on the structure of
the input file but I haven’t found fhadd to be slower than hadd in any case.

Best regards,


1 Like