Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not convinced there are "a lot" of these real and common structures.

They certainly do arise, and particularly if you're also doing concurrency linked lists are attractive because a compare-exchange type mechanism is ideally suited for such structures and that has been implemented cheaply in hardware. But this article was about the default, and we don't want defaults tailored to niche uses. The default T-shirt size shouldn't be big enough for The Rock. The default ceiling height in new buildings shouldn't be 1.5 metres. The default beverage offered at your restaurant shouldn't be Mountain Dew Code Red. It's OK that these things are options, that somebody who wants them can have them, but they're bad defaults.

I'd want to see some measurements from real world projects to believe chainig should be the default. If I take, say, the Chromium codebase, and the LibreOffice codebase, and I look at places they use any type of hash table, how often are they going to be for stuff that'd be "better suited" to chaining? Am I going to consistently find 50% ? 10% ? 1% ?



Pretty much 95% of all hybrid data structures.

Now hybrid data structures are only used in systems programming, because they require to be particularly careful about object lifetime and such.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: