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
3
u/ack_error Feb 18 '26
It's great when this works, but it's fragile. You never know when it might fail and give you something horrible -- like on Clang ARMv8 with a 64-bit swizzle:
https://gcc.godbolt.org/z/ooj7xz495