如何减少链接时间 [英] how to decrease link time

查看:83
本文介绍了如何减少链接时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道pImpl成语可以减少编译时间,但是否有任何

良好做法/成语可以减少链接时间?


任何参考或任何感谢


感谢

i know that pImpl idiom can decrease compile time, but Is there any
good practice/idiom to decrease link time?

any reference or any idea is appreciated

thanks

推荐答案

baibaichen写道:
baibaichen wrote:
我知道pImpl成语可以减少编译时间,但有没有什么好的练习/成语可以减少链接时间?

任何参考或任何想法都值得赞赏
i know that pImpl idiom can decrease compile time, but Is there any
good practice/idiom to decrease link time?

any reference or any idea is appreciated




链接时间与编译时相比极短且完全可以忽略不计

与运行时间相比。


设计代替可维护性。 pImpl通过

离婚实现和接口为此提供支持。编译时间的好处(如果

any)只是锦上添花。



Link time is so minimal compared to compile time and totally negligible
compared to run time.

Design instead for maintainability. pImpl provides support for this, by
divorcing implementation and interface. The compile time benefits (if
any) are just icing on the cake.


baibaichen写道:
baibaichen wrote:
i知道pImpl成语可以减少编译时间,但有没有什么好的练习/成语可以减少链接时间?

任何参考或任何想法都赞赏
i know that pImpl idiom can decrease compile time, but Is there any
good practice/idiom to decrease link time?

any reference or any idea is appreciated




我能给出的最好建议是不要在你的

模块中创建循环依赖。


希望这有帮助,

-shez-



The best advice I can give is do not create cyclic dependencies in your
modules.

Hope this helps,
-shez-




" baibaichen" < BA ******** @ gmail.com>在消息中写道

news:11 ********************** @ f14g2000cwb.googlegr oups.com ...

"baibaichen" <ba********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
我知道pImpl成语可以减少编译时间,但有没有什么好的练习/成语可以减少链接时间?

任何参考或任何想法都赞赏

谢谢
i know that pImpl idiom can decrease compile time, but Is there any
good practice/idiom to decrease link time?

any reference or any idea is appreciated

thanks




这有点依赖于平台。但是你可以使用dll / shared库来更大程度地支付
,因此可以链接可执行文件。可以最小化到图书馆提供的外部



我没有注意到Windows或Red Hat Linux上的链接有问题,如果

你使用HP或

IBM你可能有一些长链接工作。


也许你可以在适当的时候使用静态函数,但我怀疑这个

就像试图通过削减你的指甲来减掉

的重量。


dave



This is a bit platform dependent. But you could use dll/shared libraries to
a greater extent
so linking of the "executable" can be minimized to just the externals
provided by the libraries.
I''ve not noticed a problem with links on Windows or Red Hat Linux, maybe if
you use HP or
IBM you might have some long link jobs.

Perhaps you could use static functions where appropriate, but I suspect this
like trying to lose
weight by cutting your fingernails.

dave


这篇关于如何减少链接时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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