
Ill check it out under Linux.

Thalius
Thanks.Thalius wrote:Great Work and Thanks!
Ill check it out under Linux.
Thalius
srod wrote:Thanks.Thalius wrote:Great Work and Thanks!
Ill check it out under Linux.
Thalius
If it doesn't work under Linux then I'm afraid that I'm unable to do anything about it as I do not have a Linux box - and not likely to in the near future!Still there's no api involved so I see no reason why it should not work.
Hang on, what am I doing producing code without any api? That's sick! I'd better add some quickly!
Not exactly, although there are similarities I guess. A linked list in PB is strictly typed in that each element contains data of the same type. The fact that you can access each element of a linked list directly from it's address is a consequence of the way structures are handled by PB, nothing more.kinglestat wrote:yes, this is what I assumed is happening....so from assumption to certainty is a great step. Still my original answer remains a mystery...essentially my view how PB deals with pointers.
If I understand you, a linkedlist in pb is a "cast" in c for a generic pointer?
eg
(linkedlist *) ptr;
It depends on how many 'collisions' there are. That is it depends on how many other entries in the table have hashes which match the one dervied from the key you gave. At best, 1 hash followed by 1 lookup. At worst, 1 hash followed by n lookups, where n is the number of entries from the SAME hash table sharing the same hash .Mistrel wrote:srod, you just saved me a whole lot of grief. Thank you for this!
If I try to look up an entry with an invalid key is the search time still about O(1) or is it O(n)?
Well, if an individual hash table starts to fill up then the average number of lookups required to find an entry will of course rise. The obvious solution is to then increase the size of the hash table, but this is equivalent to using a second table instead!kinglestat wrote:good explanation, as always srod
But there is another use which people often miss with hash tables; you can use a single hash table for all your (or most of your data)...no need to make a seperate hash