r/cpp • u/Little-Reflection986 • Feb 16 '26
Favorite optimizations ??
I'd love to hear stories about people's best feats of optimization, or something small you are able to use often!
135
Upvotes
View all comments
Show parent comment
1
u/mapronV Feb 19 '26
Sorry, where is a trade-off? What I trading for? Extra function call? In our company, filling vector without a reserve won't pass a review, you always have to have some estimate. (even if you can't always reserve for exact elements). Do you fill vector without reserve often? I am curious.