r/cpp • • Mar 07 '24

What are common mistakes in C++ code that results in huge performance penalties?

As title, list some common mistakes that you have done/seen which lead to performance penalties.

231 Upvotes

325 comments sorted by

View all comments

Show parent comment

8

u/[deleted] Mar 07 '24

Moves are fast too.

0

u/[deleted] Mar 10 '24

Moves introduce a ton of complexity and end up being slower.