Inlining always reduces the number of instructions executed (since at a minimum the call and return instructions are not executed), but it can (and often does), make the resulting code bigger.
内联总是减少指令执行的数量(这是由于最低限度的调用和返回指令没有被执行),但是它能(并经常)让结果代码变得很大。
Cons: Overuse of inlining can actually make programs slower. Depending on a function's size, inlining it can cause the code size to increase or decrease.
限制:过度使用内联函数实际上会使减慢程序运行,取决于函数体大小,它决定了代码增加或减少。
The decision to inline is based on an estimate as to whether inlining will result in smaller code size.
决定内联是基于估计到是否内联将导致更小的代码尺寸。
应用推荐