Hacker News new | past | comments | ask | show | jobs | submit login

Uhh.... maybe dont roll your own data structure if such a basic issue is causing you havoc.



Maybe link to a resource for people to download a good implementation of that data structure. Maybe link to an article describing hot so implement this data structure correctly in depth. Maybe try finding some other way to add to the conversation instead of disparaging the author for sharing something they learned. Maybe don’t post anything at all if you don’t have something productive to say. Maybe use nonviolent-communication (NVC) techniques to say exactly what you just said, but without condescension or attack.


This makes it sound like it’s the author’s fault or something. They’re pointing out a pretty subtle gotcha.


Aside from the other replies, I should point out that two very capable programers had to implement this differently because the performance implications of a design decision are different depending on the working-set size.

For all but the most basic data structures, the variations are so many that rolling your own is often a good design choice.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: