General Question about the length of a macro

HI,
Here I have a general question. If does a root macro have a limit of its length, for example, 1000 lines? I have a macro with more than 1100 lines. It costs 10 sec to run it. However, then I add a line in the code. The running time will be great increased to 50 sec even more no matter what kind of the line is added. I feel so confused. Only adding a line which in fact has no any big deal can decrease greatly the running speed. My macro is long and based on some input data files. I cannot post it here to let you reproduce the problem. Could you give some general idea about it? Or give me some methods to find the error(s)?

Thanks,
Zhiyi.

Hi,

I cannot reproduce this. I ran a macro that does Double_t d[2000]; d[0]=1.; d[1] = sin(d[1-1]*1); d[2] = sin(d[2-1]*2); d[3] = sin(d[3-1]*3); d[4] = sin(d[4-1]*4); for 1 up to 1999 d values. As you can see from the attached plots (I ran it twice), the time is nicely proportional to the number of lines, and fluctuations are probably caused by the OS. So we’ll indeed need your macro.

Cheers, Axel.


Hi,

Masa Goto is currently rewriting the CINT execution engine, including the optmizer part.
In the currently implementation, the optimizer has an upper limit above which it can no longer optimize the interpreter function. Once this limit is reached no optimization at all is done on the function.
For now when you reach this limit, please compile you code (using ACLiC).

Cheers,
Philippe.