bitSet and Arrayset + problem with "bitset=new bitset (count, arrayset)"

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Feb 14 12:33:40 CST 2005


On 2/14/05 11:36 AM, "Olivier" <vidal_olivier at yahoo.fr> wrote:

>> But they will do the same conversion, so you will no win speed.
>> 
> ok
>> In the worse case you can add own wrapper-functions to remove
>> duplicated
>> code. Right ?
> right
> 
> 
> BitSet and ArraySet are SO fast in theory the one as the other one?
> Right?

If they have the same speed?

Oliver, here several issues:

- speed of creation
- speed of iteration.

We already have consider, that if you find FEW records then ArraySet faster
to create. Otherwise BitSet will be faster.

In any case, there is nothing faster of these 2 things.
 
> What makes that the one or the other one will be faster will depend
> only the memory used? That's right?

The argument to choose between them:

    relation between   (found records) / (total records on table)

Please find my old letter when I do calculations.


> If we use a bitSet with small one selection of returned records or an
> arrayset with a big selection of returned records, the code will be
> badly optimized and will maybe be slower, that's right?

It will be LITTLE slower of ideal. You see?
This will not be so drammatical slow down.

And I have told:

* if you will do SEVERAL field search:
    then choice is bitset usually

* sorting -- only ArraySet.


ArraySet for search should be used if you know that you have table with 100K
- million records, but you will find 1 or 4 or 10 or even 100 records.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina-beta mailing list