• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Quick String-List Searches For Record Finding

Extrarius

Senior member
I'm working on developing an IRC server, and I need a VERY fast method comparing a single string to all the strings in a list, to find which record the string should be associated with. So far, the fastest thing I can think of would be a hash table with each bucket being a binary tree (probably a red/black tree as I understand they stay ballanced to be faster but I couldnt find much about implementation online. There is plenty on insertion, but I need to be able to delete records from the tree as well).Does anybody have any ideas on anything more speed-efficient that doesnt waste too much memory either?
Also, does anybody know of a good place for information on red/black trees? I also need help finding a good hashing algorithm. Almost every character can be used in channel names and this is what the table will be for (it needs to be able to quicky find a channel record from a string), but because of the human factor, normal text will occur more often. I plan on using a second hash for the key to the red/black table, so I really need 2 hashing algorithms that have opposite results (if one algorithm returns the same number for 2 strings, the other algorithm should return vastly different numbers)
 
Back
Top