[Theory] how to compare size of BitSet bs ArraySet.

Ruslan Zasukhin sunshine at public.kherson.ua
Tue May 2 17:20:33 CDT 2006


On 5/2/06 4:38 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:

> To calculate if BitSet or ArraySet is best to use, Np is count of physical
> records.

Aha.

> Joakim 
> 
>> -----Original Message-----
>> From: Ruslan Zasukhin [mailto:sunshine at public.kherson.ua]
>> Sent: 02 May 2006 15:27
>> To: Joakim Schramm
>> Subject: Re: Table structure and Blinks - Success!
>> 
>> On 5/2/06 4:18 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
>> 
>>> Oh can you straith out this expression for me found in kernel doc
>> 
>> You mean to explain it?
>>  
>>> N = (Np / 8) / 4 = Np / 32
>>> 
>>> I just get = True when testing it, I am NOT a mathematican :-)
>> 
>> Please remind me what this about ?

* AraySet keep ULONGs = 4 byte = 32 bits

* BitSet use one bit, but size always is equal to Number of Physical Records
in table.

If you have Np = 1024, then bitset is 1024 bits
                                     (1024 / 8) = 128 bytes.

This is clear. Right?

Now ArraySet................

    1 item  = 4 bytes
    2 items = 8 
    3 items = 12

WHEN size of arrayset will become = size of bitset?

    128 bytes / 4 byte = 32 items.

So while you have < 32 items, ArraySet wins.
While you have from 33 to 1024 items BitSet start win.

    (1024 / 8) / 4 = 32


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list