Re: [ROOT] Complex Matrix, Complex Vector

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Sat May 19 2001 - 01:56:46 MEST


Hi Thorsten,

  I second Pasha, could you provide some performance numbers between
a non-templated vector/matrix package and a templated version. The first
one must be dog slow compared to the templated one as I understand.
For example between CLHEP and your package or between the ROOT matrix
class and yours.

We are very much in favour of efficient code (ROOT beats PAW, i.e. Fortran,
in most areas), but on the other hand we don't want to give up essential
functionality for a few percent gain in efficiency. 

Cheers, Fons.


PS: talking about performance, what do you think about skipping C++ and
    going directly to Java? :-)


On Sat, May 19, 2001 at 12:32:49AM +0200, Thorsten Glebe wrote:
> Hi,
> 
> "Jacek M. Holeczek" wrote:
> 
> > 2. > - BUT, I see many people requesting:
> >    > -- interactive access via CINT (debugging purpose mainly). (Rene ?)
> >    ... we can't seem, however, to agree on the need of INTERACTIVE access
> >    to matrices, vectors, ..., from CINT. I fully support Rene's point, and
> >    more. I DO WANT interactive access to these data.
> >    My idea is the following - the time consuming algorithms are compiled,
> >    linked to the ROOT dynamically via a shared library. The organization
> >    of what happens (and when) is done by an INTERPRETED script (I mean,
> >    from the command line, for example). That is, for example, I create the
> >    matrix from the root prompt, then I call a compiled function to fill
> >    it, ..., and finally I look at results. Then I INTERACTIVELY multiply
> >    the matrix by some kind of a vector, or a number, and repeat the
> >    process. Maybe I decide to make the matrix diagonal, ... ?
> >    Maybe I create two matrices and decide to add them ?
> >    All these actions MUST be available from the interpreter.
> >
> 
> I hope it is clear to you what this means: for active libraries like Blitz++
> you have to precompile
> operations like
> 
> A + B
> A + B + C
> A + B + C + D
> A * B
> A * B + C
> ... (and so on, of course for each dimension used individually!)
> 
> The reason is that the expressions itself are templates.
> 
> The consequence is that one can hardly provide a library which satisfies the
> needs of the majority of the users. The user has to
> make such a library by his own, precompiling the operations he wants to use
> in CINT.
> But this is not convenient any more as precompiling expression templates for
> CINT is really ugly. This is something
> the average user will for sure not do. Also alternative possiblities (like
> wrapper functions) are not feasible if you think
> about it for a minute.
> 
> All these problems do not exist of course with trivial Vector/Matrix
> implementations like those of the CLHEP library. Those
> you can easily incorporate in CINT, but as I mentioned, the performance is
> (even in compiled code)  low.
> 
> So the problem to me is the following: A ROOT user will certainly prefer
> those Vector/Matrix classes which are supported by
> ROOT. If you provide Vector/Matrix classes which can easily incorporated into
> CINT, you leave the user with low performant
> numerical code even if he fully compiles it!!!
> If you want to provide a Vector/Matrix library which has an attractive
> performance compared to hand written FORTRAN/C
> routines you will have certainly big problems to make a reasonable
> integration into CINT.
> 
> I am pretty sure that a ROOT user wants both: CINT integration plus high
> performance. Therefore the only solution might be to support both: a high
> performance Vector/Matrix class with I/O capabilities but with very limited
> access in CINT and
> a slow but fully CINT functional Vector/Matrix class for convenient
> programming.
> 
> > 5. > ... the HERA-B experiment which uses a high performance C++
> >    > Vector/Matrix algebra library ... (Thorsten)
> >    Can you predict whether your library can be made "visible" in CINT ?
> 
> Yes, I can predict: No!
> 
> Goodbye,
>   Thorsten

Content-Description: Card for Thorsten Glebe


-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:45 MET