From: Egon W. <ego...@gm...> - 2008-09-11 16:10:16
|
Rajarshi, thanx for posting this! On Thu, Sep 11, 2008 at 4:50 PM, Rajarshi Guha <rg...@in...> wrote: > What I was interested in was the memory usage for individual Atom and > Bond objects. The shallow sizes for them are as follows: > > Object Num Object Size (bytes) Avg Size (bytes) > Atom 13,923 1,447,992 104 > Bond 14,335 688,080 48 > boolean[] 31,810 764,800 24.04 I have had similar observations... > I've included the entry for boolean[] just out of interest - I assume > these correspond to the flags for each atom, bond (as well as > IAtomContainer), so that explains the large number of them. But as > expected the size if quite small. > > What is a little worrisome is the size of Atom objects! Same here... this is why I like to see IAtomType, IElement, IIsotope as fields, instead of using hierarchical structure. But I'm sure there are other places where we can optimize... e.g. using enum for the common CDKConstant's, short instead of integer for atomic number (!), drop the use of Symbol is primary identifier and rely on the atomic number (and use IPseudoAtom for every symbol for which there is no symbol, which we expect people do anyway), use float for coordinates instead of double. Egon -- ---- http://chem-bla-ics.blogspot.com/ |