3 ms·
Uhh.... maybe dont roll your own data structure if such a basic issue is causing you havoc.
by waynesonfire 3y ago
Uhh.... maybe dont roll your own data structure if such a basic issue is causing you havoc.
- travisjungroth 3y agoThis makes it sound like it’s the author’s fault or something. They’re pointing out a pretty subtle gotcha.
- schneems 3y agoMaybe 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.
- aidenn0 3y agoAside 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.