# Speeding up the PyROOT loop over TTree with RDataFrame

**URL:** <https://root-forum.cern.ch/t/speeding-up-the-pyroot-loop-over-ttree-with-rdataframe/34634>\
**Category:** ROOT\
**Tags:** python, rdataframe\
**Created:** [June 16, 2019, 3:48pm UTC](https://root-forum.cern.ch/t/speeding-up-the-pyroot-loop-over-ttree-with-rdataframe/34634 "2019-06-16T15:48:15Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [June 26, 2019, 11:49am UTC](https://root-forum.cern.ch/t/speeding-up-the-pyroot-loop-over-ttree-with-rdataframe/34634/9 "2019-06-26T11:49:38Z")

</div>

Some of your measurements are surprising, e.g. python @ 2353543 is way lower than what a fit would suggest.

For python I get `2s + 1E-4s*N`, for RDF it’s `6s + 2E-6s*N`. The constant time isn’t what it should be - and we’ll improve likely both parameters by factors during the next 18 months: we know exactly what we want to do to fix them. (FYI: bulk processing of `RNTuple`)! ![RDF](https://root-forum.cern.ch/uploads/default/original/3X/f/9/f9b6d1b908a0c97d37483dce27c5f5291ca80718.png)

---

_[View the full topic](https://root-forum.cern.ch/t/speeding-up-the-pyroot-loop-over-ttree-with-rdataframe/34634)._
