使用'内联'的缺点 [英] Disadvantage of using 'inline'

查看:76
本文介绍了使用'内联'的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我不关心我的可执行文件的大小或编译时间,那么是否有任何理由我不想在我的代码中内联每个函数来生成
/>
程序运行效率更高?

If I don''t care about the size of my executable or compile time, is there
any reason why I wouldn''t want to inline every function in my code to make
the program run more efficient?

推荐答案

在< fl ************* ******@read2.cgocable.net> Method Man < a@b.c>写道:
In <fl*******************@read2.cgocable.net> "Method Man" <a@b.c> writes:
如果我不关心我的可执行文件或编译时间的大小,是否有任何理由我不想内联每个函数在我的代码中使程序运行效率更高?
If I don''t care about the size of my executable or compile time, is there
any reason why I wouldn''t want to inline every function in my code to make
the program run more efficient?




1.内联不是C的便携功能。


2.无法保证内联的所有内容都会加快代码的价值。较大的可执行文件意味着使用

处理器缓存的效率较低。


Dan

-

Dan Pop

DESY Zeuthen,RZ集团

电子邮件: Da ***** @ ifh.de

目前在欧盟寻找工作



1. inline is not a portable feature of C.

2. There is no guarantee that inlining everything is going to speed up
your code. Larger executable means less efficient usage of the
processor cache.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union


Method Man写道:
Method Man wrote:
如果我不关心我的可执行文件或编译时间的大小,是否有任何理由为什么我不想在我的代码中内联每个函数来使程序运行效率更高?
If I don''t care about the size of my executable or compile time, is there
any reason why I wouldn''t want to inline every function in my code to make
the program run more efficient?




无意识的内联可能会导致代码膨胀,这将使你的

程序有效地运行_


-

祝你好运,

Andrey Tarasevich



Thoughtless inlining might easily cause code bloat, which will make your
program run _less_ efficiently.

--
Best regards,
Andrey Tarasevich


问候,


Dan Pop写道:
Greetings,

Dan Pop wrote:
在< fl ******************* @ read2.cgocable.net> Method Man < a@b.c>写道:

In <fl*******************@read2.cgocable.net> "Method Man" <a@b.c> writes:

如果我不关心我的可执行文件或编译时间的大小,是否有任何我不想要的理由内联我的代码中的每个函数,使程序运行更高效?
If I don''t care about the size of my executable or compile time, is there
any reason why I wouldn''t want to inline every function in my code to make
the program run more efficient?



1.内联不是C的可移植功能。


1. inline is not a portable feature of C.




很奇怪,我一定是非常误读6.7.4:函数说明符

-

Kyle A. York

Sr. Subordinate Grunt,SC



Odd, I must be horribly misreading 6.7.4: Function specifiers
--
Kyle A. York
Sr. Subordinate Grunt, SC


这篇关于使用'内联'的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆