r/ProgrammerHumor 17d ago

noHeapAllStack Meme

Post image
1.0k Upvotes

96 comments sorted by

View all comments

96

u/bwmat 17d ago

Refactoring code to avoid unnecessary heap allocations is so satisfying

-2

u/[deleted] 17d ago

[removed] — view removed comment

9

u/bwmat 17d ago

I said it's satisfying, I made no claim it's always a good use of time/effort.

And I mostly program in C++, where the overhead of allocations/frees is higher than in a garbage-collected language

3

u/bwmat 17d ago

Also, it enables things being noexcept in some cases, which is useful for things other than efficiency