XHashTable is now committed to trunk.
I've not yet dared to also commit testing code which is now in my
(rebased) branch xhash. This builds on a standard automake test
framework which I would eventually want to go to trunk, but there is no
need to include it in the upcoming release.
>> While I revised the code, I had the impression, that I could probably
>> have all those counters as SingleInteger instead of Integer (as they are
>> now). I refrained from changing it, since (a) the numbers in
>> arrayLengths are bigger than 64bit and (b) fixnum on a 32bit machine is
>> probably too small. Anyway, that's certainly a direction for improvement.
> Actually, SingleInteger is big enough: SingleInteger is supposed
> to be enough for size of an array, so if range is limited, then
> available sizes of arrays (and consequently hash tables) are
> limited too.
I've still committed with Integer for indices and sizes.
I currently have
arrayLengths: PrimitiveArray N := [[_
7, 13, 31, 61, 109, 241, 463, 1021, 2029, 4093, 8089, 16363,_
32719, 65521, 131011, 262111, 524221, 1048573, 2097133,_
4193803, 8388451, 16777141, 33554011, 67108669, 134217439,_
268435009, 536870839, 1073741719, 2147482951, 4294965841,_
8589934291, 17179868809, 34359737299, 68719476391,_
137438953273, 274877906629, 549755813359, 1099511626399]]
that's probably overshooting quite a bit. But restricting to fixnum
values on 32bit machines? Isn't that be a bit too small?
Waldedk, how would you initialize that array depending on the machine
type? (Note that then I allocate an array that is twice the size of the
respective number, since keys and entries are stored in the same flat
array.)
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.