[ROOT] CINT cpu speed?

From: Arthur E. Snyder (snyder@SLAC.stanford.edu)
Date: Tue Jan 28 2003 - 00:51:00 MET


I find speed of C++ interpreter to be much slower in new versions of root
than in old ones. Using the code attached below to read in an ASCII file I
find a factor of 2 decrease in the speed of the macro between 3.02-07
and  2.23-12. Why is that? This not progress!

Even stranger is that the original version of this code which used "cout"
rather than "printf" to print out variable "count" is even slower. That
one ran 10x slower in 3.02-07 than 2.23-12 the 1st time it was executed,
but improved to only 2x slower when executed again. I'm not sure if this
really had anything to do with use of "cout <<" instead of  printf, since
other minor changes such as putting in a few statements to print cpu time
used also produced improvement from 10x worse to only 2x worse.

Anybody have any idea what's going on here?

-Art Snyder, SLAC


ASCII tuple reader:

TNtuple* readASCII() {
ifstream fp("paw/pion-1.612.tuples");

TNtuple* temp=new TNtuple("ntuple","ascii
data","evtno:npievt:status:idmom:eve:ideve:b:idb:xb:yb:zb:
xeve:yeve:zeve:pxpimc:pypimc:pzpimc:ptpimc:ppimc:thpimc:
phipimc:pxpirc:pypirc:pzpirc:ptpirc:ppirc:thpirc:phipirc:
xpirc:ypirc:zpirc:nsvtpi:ndchpi:lenpi:delth:delthalt:pxalt:
pyalt:pzalt:thalt:phialt:xalt:yalt:zalt:pxmom:pymom:pzmom:
ptmom:pmom:thmom:phimom:xmom:ymom:zmom:idpimom:idpigma");

Float_t array[56];
Int_t loop=1;
Int_t count=0;

while(loop) {
 for(Int_t i=0; i<56; i++) {
fp >> array[i];
 }
temp->Fill(array);
count++;
if(count>=16434) break;
if(count%1000==1) printf("count: %d \n",count);
}

printf("total: %d \n ",count);
return temp;
}




A.E. Snyder, Group EC                        \!c*p?/
SLAC Mail Stop #95                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`
e-mail:snyder@slac.stanford.edu                 o
phone:650-926-2701                              _
http://www.slac.stanford.edu/~snyder          BaBar
FAX:650-926-2657                          Collaboration



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