Array of ids, or a new class
Posted: Fri Aug 07, 2009 12:13 pm
by ConvertFromOldNGs
by pillick >> Thu, 5 Sep 2002 21:42:34 GMT
What takes up the least space out of:
A Demimal of legnth 7
A pointer to an object (which has only one attribute - the decimal value)
Re: Array of ids, or a new class
Posted: Fri Aug 07, 2009 12:13 pm
by ConvertFromOldNGs
by allistar >> Thu, 5 Sep 2002 22:16:03 GMT
The reference to the object will take up less space, although the
object itself will take up a lot more space that just a Decimal
property by itself.
A decimal takes up 3-12 bytes depending on the precision (aligned to
the nearest octet).
A shared object reference takes up 6 bytes.
An object has a fixed header part of 41 bytes, and also has a trailer part that takes up space as well.
(From page 313 of the devref.pdf file).
Allistar.
------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND
Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------