什么是“增量链接”?

发布于 2024-09-11 21:06:57 字数 127 浏览 4 评论 0原文

我查看了 Microsoft 的 MSDN 和整个网络,但我仍然无法很好地了解它是什么。

这是否意味着已完成的程序在执行期间的不同时间加载 DLL,而不是在启动时立即加载所有 DLL?

我完全偏离了吗? :)

I've looked at Microsoft's MSDN and all around the web, but I still haven't been able to get a really good idea of what it is.

Does it mean the completed program loads DLLs at different times during its execution, as apposed to all at once upon launch?

Am I totally way off? :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那小子欠揍 2024-09-18 21:06:57

链接涉及将从源文件构建的所有 .obj 文件以及您引用的任何 .lib 文件打包到输出中(例如 .exe 或 .dll)。

如果没有增量链接,则每次都必须从头开始完成。

增量链接以一种方式链接您的 exe/dll,使链接器在您进行小的更改并重新编译时更容易更新现有的 exe/dll。

因此,增量链接只会使编译和链接项目的速度更快。

它可能产生的唯一运行时影响是,它可能会使您的 exe/dll 稍微变大且变慢,如下所述:

http://msdn.microsoft.com/en-us/library/4khtbfyf.aspx

编辑:正如 Logan 提到的,增量链接也不兼容 链接时间代码生成 - 因此失去了可能的性能优化。

您可能希望在调试版本中使用增量链接来加速开发,但在发布版本中禁用它以提高运行时性能。

您可能正在考虑延迟加载 DLL:

http://msdn.microsoft。 com/en-us/library/151kt790.aspx

Linking involves packaging together all of the .obj files built from your source files, as well as any .lib files you reference, into your output (eg .exe or .dll).

Without incremental linking, this has to be done from scratch each time.

Incremental linking links your exe/dll in a way which makes it easier for the linker to update the existing exe/dll when you make a small change and re-compile.

So, incremental linking just makes it faster to compile and link your project.

The only runtime effect it might have is that it may make your exe/dll slightly bigger and slower, as decribed here:

http://msdn.microsoft.com/en-us/library/4khtbfyf.aspx

Edit: As mentioned by Logan, incremental linking is also incompatible with link time code generation - therefore losing a possible performance optimization.

You may want to use incremental linking for debug builds to speed development, but disable it for release builds to improve runtime performance.

Delay loaded DLLs may be what you are thinking of:

http://msdn.microsoft.com/en-us/library/151kt790.aspx

紙鸢 2024-09-18 21:06:57

此外,非常重要的是,增量链接是 Edit&Continue 的先决条件 - 可以编辑代码并动态重新编译它,而无需重新启动。

因此,在调试版本上使用是一件好事,但在发布版本上则不然。

Also, quite importantly, incremental link is a prerequisite for Edit&Continue - possibily to edit your code and recompile it on the fly, without restarting.

So it is a good thing to have on debug builds, but not release builds.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文