Re: [ROOT] reduction

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jan 17 2002 - 15:48:44 MET


Hi Christian,

I must diasgree with you for at least 3 reasons.
  - ROOT compression will do better than your 1 byte data type.
  - Very often , placing 1 Byte element in a class creates a misalignement
    problem and you run the risk to lose more space than you think to gain
    and also to lose time due to the misalignement
  - We cannot support all possible cases in the collection classes:
    a TObjArray with a wordcount of 1,2,4,8 bytes.

A TClonesArray is very efficient (storage wise and I/O wise), in particular
when you have many tiny objects.

Rene Brun

Christian Holm Christensen wrote:
> 
> Hi Rene,
> 
> On Wed, 16 Jan 2002 22:26:03 +0100 (MET)
> Rene Brun <Rene.Brun@cern.ch> wrote
> concerning "Re: [ROOT] reduction":
> > Hi Christian,
> >
> > What Karl is doing is perfectly correct and a very efficient solution.
> > As indicated in a previous mail, I have fixed a problem in the
> > TBranchElement constructor where an unnecessary buffer was created
> > for the counter branch of the TClonesArray. With this fix, the
> > average size of the counter should be below one byte in average.
> > I am just waiting the confirmation from Karl.
> 
> I know it's perfectly alright.  It's just that if you only need to
> store numbers from 0-255 in a member, why not use the 1 byte Byte_t
> type rather than the 2 Byte_t UShort_t type?  That'll save you 1 byte
> of data for each instance of the class stored on the tree.
> 
> Yours,
> 
> Christian Holm Christensen -------------------------------------------
> Address: Sankt Hansgade 23, 1. th.           Phone:  (+45) 35 35 96 91
>          DK-2200 Copenhagen N                Cell:   (+45) 28 82 16 23
>          Denmark                             Office: (+45) 353  25 305
> Email:   cholm@nbi.dk                        Web:    www.nbi.dk/~cholm



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:38 MET