Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

motherfucking hahstables

Name: Anonymous 2010-06-14 10:34

Hello /prog/

Im trying to implement a hash-table algorithm, the problem is: i dont know shit about hash-tables.

Now i might seem noobish for asking, but can someone explain them to me, Wikipedia didnt help a dick.
All i could find out was that the key has to be encoded in some way.

On a side note, why the fuck is it called a linked list? Isnt it obvious that it is linked, else it wouldnt be a list would it.

Name: Anonymous 2010-06-14 11:57

>>4

To look up a value, you, hash the key, do a binary search
I read somewhere that hash tables should have a constant overhead, but if i were to implement a search would not the key with say the lowest number, if we assume it would use a numerical index, be the first one to be found.

Im concerned about the trade off between memory and speed.

I would i not have to allocate many empty keys that i would not even use for such a search algorithm.

So why do you need to implement your own? Even if I'm using a language that doesn't have hashtables, I just pick a good hashtable library and just use that.

Because i am making ma own lisp dialect, so i have to reinvent the wheel again.
I need for the symboltable in first line.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List