3 ms·
This is a very unproductive comment / view-point. I find the anti-learning stance troubling. This is a link to a very technical article hash table implementati
by mtanski 11y ago
This is a very unproductive comment / view-point. I find the anti-learning stance troubling.
This is a link to a very technical article hash table implementation a pretty popular data structure. Right at the top it tells you that's what it's about. Also, if you bother to check the side of the article when it list recent article or go look at the other blog post you'll see it's a follow up on a previous article on lock-free hash tables that use this method. That's more then plenty of context if you just give it more then 5 seconds.
> Although some ideas seem pretty clever, I've too often seen code implementing this in a haphazard way (buggy, no comments). This leaves the next programmer scratching their head and wondering ... why? Unless you have very specific performance and memory constraints, I do not see the need for such structures in most every programmers daily business.
Again, right in the article... the guy tells you that the common implementation of using a linked list for buckets in hash table is performance unfriendly (cache unfriendly) on modern machines.
Just because you don't see a need for it in your daily business, doesn't mean others do not there are plenty of cases where linear probing hash tables make sense. This includes any kind of GPU computing, databases, or anywhere your bottle neck is a particular lookup data structure. And yeah, those are all niche use cases, but they numerous and important enough where somebody might learn something.
- kelvin0 11y agoI don't think this type of information shouldn't be disseminated. I wanted more context as to the use of the structure, or what brings the author to demonstrate it. Not having such context, I then express some concerns with the shoddy implementation I've seen in other code bases associated with this structure. Not to say this is not useful, OR that all implementation of hash tables are sloppy of course. Also, I clearly think it does have it's use, I just wanted more background info from the author. The article is otherwise very well written and explains fairly clearly the structure and some caveats.