Ralf Hemmecke wrote:
>
> I've just pushed the revised XHashTable to my github repo.
>
> https://github.com/hemmecke/fricas/commit/9e60187f531876811cb47834cf8bf3f2360c5e28
>
> Waldek, for your convenience, I've attached the old and new spad file.
>
> The main differences are:
>
> I've changed the representation to include a few more counters and the
> two thresholds for ordinary load (0.7) and "virtual" load (0.9) (i.e.
> occupied+deleted entries).
>
> The counter and rehashing in the search routine is gone. I now only need
> one single search function "localSearch".
>
> The search is basically the same as before, but from the return value
> one can distinguish whether a free entry is VACANT or DELETED.
> This enables me to keep track of the deleted entries.
>
> Rehashing and growing the table is now solely done in setelt.
>
> 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.
>
> Waldek, if you are satisfied, I'll reorder and squash some of the
> commits and then commit to trunk.
>
Yes, please go on.
--
Waldek Hebisch
[email protected]
--
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.