Re: TH1 and Fill

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Fri, 23 Apr 2010 23:11:39 +0200


thanks John,

here is the contect :

i make a loop on events
for each event, i loop on objects of the events and fill, when the "complex but not too much complex" selection is fine, some histograms

i use a TBenchmark to see the time "global", and the time for the "filling of the histogram", and i see that about 90 % of the time consuming is in the Fill part of the program

so that i was wondering if there are some tricky commands to make the "Fill()" without using the "high level=slow (?) C++ root instruction myhisto->Fill(myvariable)"

regards


On Fri, 23 Apr 2010, John Idarraga wrote:

> Hello Marc,
>
> Not quite sure about your context. But if you try, for instance, to
> Fill an histogram using FillRandom(...), most of the time goes actually
> in TROOT::GetFunction(). About 99% of the time, relative to the context
> of FillRandom().
>
> So my guess is that the time you are observing goes somewhere else, not
> in the Fill() itself. Are you using valgrind --tool=callgrind ? ... you
> can track the callers and see where who is actually spending too much
> time.
>
> cheers,
>
> John
>
> On Fri, 2010-04-23 at 22:33 +0200, Marc Escalier wrote:
>> Dear rooters,
>>
>> after studying performance from a given program that fill a TH1 histogram
>> within a loop on events
>>
>> loop on the events of the tree
>> myhisto->Fill(current event with variable)
>>
>> i see from a benchmark study that 90 % of the time is consumed by the
>> myhisto->Fill(myvariable) command
>>
>> I was wondering if there are tricks to improve speed of this instruction ?
>>
>> thank you
>>
>
>
Received on Fri Apr 23 2010 - 23:11:46 CEST

This archive was generated by hypermail 2.2.0 : Sat Apr 24 2010 - 05:50:01 CEST