[BLAST_ANAWARE] int vs float, index vs key

From: Douglas Hasell (hasell@MIT.EDU)
Date: Sat Apr 05 2003 - 14:52:57 EST


Hi,

        Just for general amusement I wrote some silly little test programs
and found that floating point arithmetic is comparable in speed to integer
arithmetic. Unless I made some stupid mistake FPU's must have been
improved a great deal and consequently I don't see a big advantage in doing
the calculations in microns as opposed to mm or cm.

        The other thing I tested was the access time for maps and arrays
which we might want to use for storing calibration constants like time
offsets, wire positions, etc. I compared map(key,t0) versus t0[index] where
the time offset is stored in a map with a key formed from the sect, cham,
super, cell, and layer of the WC versus t0 stored as an array where index =
key.Get_index() is a function of the key. First, both have 954 entries for
the 954 sense wires. Accessing the array is about twice as fast as finding
it in the map. Not a huge difference unless a significant fraction of the
reconstruction time is spent search through maps.

                                                  Cheers,
                                                          Douglas

26-415 M.I.T. Tel: +1 617 258 7199
77 Massachusetts Avenue Fax: +1 617 258 5440
Cambridge, MA 02139, USA E-mail: hasell@mit.edu



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:29 EST