将程序集编译为 x64 有什么好处吗? [英] Are there any advantages to compiling an assembly as x64?

查看:29
本文介绍了将程序集编译为 x64 有什么好处吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个 .Net Framework 3.5 SP1/CLR 2.0 应用程序,它需要在 x86 和 x64 平台上运行.假设出于某种原因,我需要创建单独的 x86 和 x64 安装程序.

Suppose I have a .Net Framework 3.5 SP1/CLR 2.0 application which needs to run on both x86 and x64 platforms. Suppose as well that for whatever reason, I need to create separate x86 and x64 installation programs.

反正我有一个特定于 x64 的安装程序,将应用程序本身重新编译为 x64 而不是针对AnyCPU"有什么好处吗?

As I have an x64-specific installer anyway, would there be any benefit to recompiling the application itself as x64 rather than targeting "AnyCPU"?

将目标设置为 x64 除了生成的程序集的头信息之外是否会改变任何内容?

Does setting the target to x64 change anything at all besides the header information of the generated assembly?

推荐答案

如果您指定 x64,它会更改程序的一些默认内存设置,使其在具有较大内存压力的程序中稍微提高性能.使用 x64 编译时分配更大的线程堆栈(link)

If you specify x64 it changes some default memory settings for the program, making it slightly more performant in programs with a large memory pressure. Larger thread stacks are allocated when compiling with x64 (link)

这篇关于将程序集编译为 x64 有什么好处吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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