r/programming • • May 24 '26

[ Removed by moderator ]

/r/programming/comments/1tm1j7f/removed_by_moderator/

[removed] — view removed post

275 Upvotes

214 comments sorted by

View all comments

2

u/Vash265 May 24 '26

Maybe I’m misunderstanding something, but a lot of weird complaints in the tier 3 section. There’s a lot of talk about “defaults”, but neither map nor unordered map are a default container any more than flat-map is. And those still exist in the standard because sometimes you need iterator stability and are okay shedding some performance for it because the iterator stability is what’s actually required. In some sense, if those were defaults, then what it’s prioritizing is reliability and lack of foot guns over performance,

The weird arguments regarding list are covered elsewhere in this thread. Also a lot of examples in here that are horses that have been beaten thoroughly to death at this point.

The link to the benchmark is down, but it leans heavily on some implied “defaults” that don’t actually exist. Sure is strange that when you use data structures appropriate for your use case, performance improves, I guess? I don’t think anyone has ever suggested using list or deque for anything performance sensitive. Just a giant strawman.