[Biojava-l] ResidueList & Annotatable
Mark Schreiber
mark_s@sanger.otago.ac.nz
Thu, 27 Jan 2000 09:16:31 +1300 (NZDT)
On Wed, 26 Jan 2000, Thomas Down wrote:
> This seems to be a common misunderstanding -- having Residues
> represented by first class objectd does NOT imply that a new
> object is needed for each base of a long sequence. The
> Sequence just stores REFERENCES to objects. Unless you want
> to do something interesting like having separate annotations for
> each and every residue, there will normally just be one single
> object to represent every Adenosine, everywhere within the
> virtual machine. Everything else is just a reference (which is,
> for practical purposes, a pointer). Yes, there IS a memory
> overhead for this, but it's only going to be four bytes
> (eight on a 64 bit architecture) compared to two bytes for
> a Java char.
>
> There should be no performance problems at all -- comparing
> two residue objects will normally just be a question of comparing
> two pointers (no more expensive, CPU-wise, than comparing two
> chars -- maybe even faster on some modern processor architecture
> which aren't actually terribly happy handling char data).
Ahh it is all becoming clear to me now. Still 16 million bytes compared to
32Meg or 64meg for the ecoli genome still sounds a little heavy for a
desktop PC (unless you have a big hard drive cache). Not a problem for a
Sun however. The human genome is a bit more daunting.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Schreiber Ph: 64 3 4797875
Rm 218 email mark_s@sanger.otago.ac.nz
Department of Biochemistry email m.schreiber@clear.net.nz
University of Otago
PO Box 56
Dunedin
New Zealand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~