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

前端 未结 9 2048
执念已碎
执念已碎 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:36

    If you are truly worried, you can tell your compiler to inline the constructors. This optimization step should leave you with clean code and clean execution.

提交回复
热议问题