News for hackers. Stuff that matters.
Re:Why databases use ordered indexes but programming uses ha... by kodablah on Tuesday December 10, 2019 @03:37AM (#21750741)
Premature optimization concerns effort. We do a lot of things when writing code that could be considered premature optimization by your vague definition. By this definition too, staying in Java land, I should probably not instantiate my ArrayList or HashMap with a capacity even if I know it...technically premature optimization.

All else equal wrt simplicity, choose the highest performing option that contains the features you need. Dogmatic premature optimization rules are unhelpful. We can apply reasonable thinking, and we should.

Re:Why databases use ordered indexes but programming uses ha... by naasking on Tuesday December 10, 2019 @10:32AM (#21753354)
> Premature optimization concerns effort

And the OP is correct that writing a correct comparison function needed for an ordered map is easier than writing a correct hash function that is properly distributed. So the ordered map is lower effort for that reason alone, although the other properties the OP lists also produce valid reductions of effort.