Re: RE: [ROOT] execution speed of compiled programs using ROOT

From: Thomas Nisius (tnisius@web.de)
Date: Thu Aug 14 2003 - 10:14:01 MEST



Hi,

for me, it is impossible to reproduce your results. I did the same tests and I always get a slowdown by a factor of 2, when root is used. I observed, that when optimization is to aggressive, any root dependent stuff is optimized 'away'; (i.e. there is no more root code involved)
I think in your case, Valeri, this explains the same duration for both versions. (with & without root)
Do you have any other code that can be used to do further tests?

By the way, I also get this slowdown if I link the root libraries explicitly to my prog. even if there is no call to any root-routine.

Any suggestions?

Thanks in advance,
Thomas Nisius

>
> Hello I made the simple experiments
>
> 1. Compile the code in ! question with Optimization
> 1.1. #define USE_ROOT
> 1.2. #undef USE_ROOT
>
> 2. Compile the code in question with NO Optimization
> 2.1. #define USE_ROOT
> 2.2. #undef USE_ROOT
>
> 3. Change the loop as follows:
> for(long int i=0; i<100000000; i++) {
> r += 0.5;
> y = sin(r);
> }
> Compile the code in question with NO Optimization
> 3.1. #define USE_ROOT
> 3.2. #undef USE_ROOT
>
> 4. The code from the point 3 but with Optimization
> 4.1. #define USE_ROOT
> 4.2. #undef USE_ROOT
> 5. remove any ROOT call and replace it with
> double y = sin(3.5);
> for (int j=0; j < 10;j++) {
> y = sin(y);
> }
> no optimization
> ------------------------------
> Duration
> 1.1 340
> 1.2 340
>
> 2.1 921
> 2.2 2643 (!!!)
>
> 3.1 17265
> 3.2 19137
>
> 4.1 340> 4.2 340
>
> 5.1 2673
> 5.2 2633
> ----- -------------------------
>
> In other words
> when "#define USE_ROOT" is ON the code is FASTER by factor 3 !!!
> (see 2.1 and 2.2 )
>
> At least my result does contradict YOUR observation.
> I don't go further because the code in question is not good to jump
> to any kind of the conclusions.
>
> Have a fun.
>
> Valeri
__________________________________________________________________________
Die sicherste Form der Kommunikation: E-Mails verschluesseln, Spam-Filter,
Adressverifizierung, digitale Unterschrift: http://freemail.web.de



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET