什么是快速动态链接的可执行文件或静态链接的可执行文件?如何决定? [英] what is fast dynamically linked executable or statically linked executable ?how to decide?

查看:78
本文介绍了什么是快速动态链接的可执行文件或静态链接的可执行文件?如何决定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以澄清如何在编译期间减少可执行文件的大小

代码。

可以使用makefile的特定编译时标志,还是

建议使用动态链接。

这里的想法是代码越小代码越快。

动态链接的可执行文件真的更快而不是动态链接的单个

可执行文件。


gcc版本3.2.2上是否有任何性能测量指标

解决方案

pratap写道:


有人可以澄清如何减少可执行文件的大小

代码在编译期间。

可以使用特定的编译时标志和makefile,或者它是建议用于动态链接的
。 />
这里的想法是代码越小代码越快。

动态链接执行表格真的比单个

可执行文件快,而且没有动态链接。?

gcc版本3.2.2上是否有任何性能测量指标



这是该组的偏离主题。发布到系统特定组或

comp.programming。


On Sun,2007年3月4日22:21:57 - 0800,pratap写道:


有人可以澄清如何在编译期间减少可执行文件的大小

代码。



少写代码?我是认真的。 1)这是主题答案;并且

2)这可能是你得到的最佳答案。当你开始过度设计解决方案或项目时,有时最后一件事就是阻止你。


可以使用特定的编译时间用makefile标记或是

建议去动态链接。



可能两者都有。如果你正在使用Unix,你可能想要询问

comp.unix.programmer。


这里的想法是代码越小,代码越快。



有趣的想法。除非你测试它,否则你不会知道它的真实与否。

w /你现有的平台,编译器,代码和使用环境。


动态链接的可执行文件是否真的比没有动态链接的单个

可执行文件快。



尝试comp.unix.programmer或其他相关组。


是否有任何绩效衡量指标gcc版本3.2.2



Google可能知道,或GCC特定群组中的某个人。实际上,在comp.unix.programmer上有很多知识渊博的GCC民众。


santosh写道,On 05/03/07 06: 27:


pratap写道:


>有人可以澄清一个人如何减少一个人的大小可执行代码在编译期间。
可以使用makefile的特定编译时标志,还是建议进行动态链接。
这里的想法是代码大小越小代码越快。
动态链接的可执行文件确实比没有动态链接的单个
可执行文件快。

gcc版本3.2上是否有任何性能测量指标.2



这是该组的偏离主题。发布到系统特定组或

comp.programming。



有一个主题答案,当你真的需要

来减少可执行文件的大小因为你空间不足

通常是最好的答案。删除一些代码。一般删除代码

(并非总是)会导致更快的执行,这是另一个OP $
目标。毕竟,执行0语句通常需要花费更少的时间

和> 0语句。


:-)

-

Flash Gordon

删除代码通常也可以消除错误,虽然它可以引入不同的代码。
/ BLOCKQUOTE>

Could someone clarify how could one reduce the size of an executable
code during compile time.
Could one use specific compile time flag with makefile or is it
advisable to go for dynamic linking.
The idea here is that smaller the code size the faster is the code.
Is Dynamically linked executable really faster than a single
executable file which is not linked dynamically.?

Is there any performance measuring metrics on gcc version 3.2.2

解决方案

pratap wrote:

Could someone clarify how could one reduce the size of an executable
code during compile time.
Could one use specific compile time flag with makefile or is it
advisable to go for dynamic linking.
The idea here is that smaller the code size the faster is the code.
Is Dynamically linked executable really faster than a single
executable file which is not linked dynamically.?

Is there any performance measuring metrics on gcc version 3.2.2

This is off-topic for this group. Post to a system specific group or
comp.programming.


On Sun, 04 Mar 2007 22:21:57 -0800, pratap wrote:

Could someone clarify how could one reduce the size of an executable
code during compile time.

Write less code? I''m being serious. 1) Its the topical answer here; and
2) it may be the best answer you''ll ever get. Sometimes its the last thing
holding you back when you begin to over-design a solution or project.

Could one use specific compile time flag with makefile or is it
advisable to go for dynamic linking.

Probably both. If you''re using a Unix you might want to ask over at
comp.unix.programmer.

The idea here is that smaller the code size the faster is the code.

Interesting idea. You won''t know if its true or not unless you test it
w/ your existing platform, compiler, code and usage environment.

Is Dynamically linked executable really faster than a single
executable file which is not linked dynamically.?

Try comp.unix.programmer or another relevant group.

Is there any performance measuring metrics on gcc version 3.2.2

Google might know, or someone on a GCC specific group. Actually, there are
lots of knowledgable GCC folk on comp.unix.programmer.


santosh wrote, On 05/03/07 06:27:

pratap wrote:

>Could someone clarify how could one reduce the size of an executable
code during compile time.
Could one use specific compile time flag with makefile or is it
advisable to go for dynamic linking.
The idea here is that smaller the code size the faster is the code.
Is Dynamically linked executable really faster than a single
executable file which is not linked dynamically.?

Is there any performance measuring metrics on gcc version 3.2.2


This is off-topic for this group. Post to a system specific group or
comp.programming.

There is one on-topic answer to some of it, and when you seriously need
to reduce the size of the executable because you are out of space it is
often the best answer. Delete some of your code. Deleting code generally
(not always) leads to faster execution which is another of the OPs
goals. After all, it takes in general less time to execute 0 statements
and >0 statements.

:-)
--
Flash Gordon
Deleting code normally gets rid of bugs as well, although it can
introduce different ones.


这篇关于什么是快速动态链接的可执行文件或静态链接的可执行文件?如何决定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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