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
0
u/Big_Target_1405 Feb 16 '26
Measuring those things would be pointless because the interactions with the rest of the system are complex.
All you can do is measure the thing you care about (in my case, cycles to complete a queue.push()) and then use the outputs of tooling like perf as hints towards where your bottleneck might be