r/cpp • • 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!

137 Upvotes

185 comments sorted by

View all comments

Show parent comment

1

u/Fabulous-Meaning-966 Feb 19 '26

Depends on your baseline. This is often true for the glibc allocator in Linux, less so for the default libc allocator in FreeBSD (jemalloc).

1

u/lordnacho666 Feb 19 '26

That's a fair point actually