C++: Performance impact of BIG classes (with a lot of code)

前端 未结 9 1984
执念已碎
执念已碎 2021-01-17 15:08

I wonder if and how writing \"almighty\" classes in c++ actually impacts performance.

If I have for example, a class Point, with only uint x

9条回答
  •  星月不相逢
    2021-01-17 15:27

    Member functions are not copied along with the object. Only data fields contribute to the size of the object.

提交回复
热议问题