Why not mark everything inline?

后端 未结 11 625
长发绾君心
长发绾君心 2020-12-08 13:38

First off, I am not looking for a way to force the compiler to inline the implementation of every function.

To reduce the level of misguided answers make s

11条回答
  •  再見小時候
    2020-12-08 14:05

    That's pretty much the philosophy behind Whole Program Optimization and Link Time Code Generation (LTCG) : optimization opportunities are best with global knowledge.

    From a practical point of view it's sort of a pain because now every single change you make will require a recompilation of your entire source tree. Generally speaking you need an optimized build less frequently than you need to make arbitrary changes.

    I tried this in the Metrowerks era (it's pretty easy to setup with a "Unity" style build) and the compilation never finished. I mention it only to point out that it's a workflow setup that's likely to tax the toolchain in ways they weren't anticipating.

提交回复
热议问题