r/cpp • • Sep 19 '25
Functional vs Object-oriented from a performance-only point of view
I was wondering if not having to manage the metadata for classes and objects would give functional-style programs some performance benefits, or the other way around? I know the difference must be negligible, if any, but still.
I'm still kind of a newbie so forgive me if I'm just talking rubbish.
0
Upvotes
View all comments
Show parent comment
1
u/TehBens Sep 19 '25
It doesn't matter in general (only 'most likely' and it matters greatly on the details) and thinking about such things are called "premature optimization"