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!
132
Upvotes
View all comments
1
u/ptrnyc Feb 16 '26
Made my own SIMD wrapper and got 3x speed gains.
Now there are several wrappers available but I still like mine better. It overloads most operations, so you can write your code in scalar using a template type set to float, then use SIMD<float, 4> instead of float and it just works.