Inlining functions in code results in unintelligible code and even bigger management horrors.
代码中的内联函数会导致莫名其妙的代码,甚至是更大的管理灾难。
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.
内联总是减少指令执行的数量(这是由于最低限度的调用和返回指令没有被执行),但是它能(并经常)让结果代码变得很大。
Dynamic compilers, especially once method inlining takes place, have many more ways to determine that code is dead.
动态编译器(尤其是在进行方法内联之后)通过许多方法来判断死代码。
Inlining a very small accessor function will usually decrease code size while inlining a very large function can dramatically increase code size.
内联一个非常小成员访问函数会减少代码,而内联一个非常大的函数代码会戏剧性的增长。
The decision to inline is based on an estimate as to whether inlining will result in smaller code size.
决定内联是基于估计到是否内联将导致更小的代码尺寸。
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.
限制:过度使用内联函数实际上会使减慢程序运行,取决于函数体大小,它决定了代码增加或减少。
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.
限制:过度使用内联函数实际上会使减慢程序运行,取决于函数体大小,它决定了代码增加或减少。
应用推荐