Re: Fitting with user defined function

Valery Fine (fine@rsgi01.rhic.bnl.gov)
Fri, 2 Jan 1998 12:31:31 +0100


On 2 Jan 98 at 18:20, Laurent Mirabito wrote:

> Hello ,
>
> I made a fit of a Landau distribution. To do this I translate the
> cernlib DENLAN function to C++ and load it with
>
> .L denlan.C
>
> and work as it is explained in the tutorials.
>
> It works but it's very slow compare to PAW ( > 5 min / few seconds)
>
> Is there any explanation to this ? I tried to make a library with a
> compile version of the function but I didn't find any way to load
> it...
>

You did apply C++ INTERPETER. It MUST be slow. To get a "normal"
speed" you should apply your local "native" compiler, create
dynamic/share library and load the last, then proceed.

This means you should use the "pre-compiled" binary code
optimized for you particular hardware but the SOURCE one.

I'd like to say that this > 5 min sounds as a GREAT number for
the interpreted code by the way.

See ROOT/test subdirectory for Makefile examples creating the share
libraries and DLLs.

Reading http://root.cern.ch/root/CintGenerator.html may help too.

With my best regards,
Valery
=================================================================
Dr. Valeri Faine (Fine)
------------------- Phone: +1 516 344 1043
Brookhaven National Laboratory FAX : +1 516 344 4206
Bldg. 510A /STAR mailto:fine@rsgi01.rhic.bnl.gov
Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
USA

Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su