什么是32位还是64位系统.NET之间的区别是什么? [英] What are the differences between .NET in 32 or 64 bit systems?

查看:263
本文介绍了什么是32位还是64位系统.NET之间的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想象一下,一个纯粹的.NET应用程序,它不使用COM组件,也不PInvoke的。它是否重要,如果目标系统是32位还是64位?

Imagine a pure .NET application which do not uses COM components nor PInvoke. Does it matters if the target system is 32 or 64 bits?

推荐答案

假设安全code没有COM组件,P / Invoke的,等等。应该没有语义差别,但性能可能会受到影响。试想一下:更多的内存在64位,但引用是更大的。赢得一些,失去一些。

Assuming safe code with no COM components, P/Invoke, etc. there should be no semantic difference, but performance may be impacted. Consider: More memory under 64-bit, but references are bigger. Win some, lose some.

总之,这里有一些有用的参考资料:

Anyway, here are a few useful references:

  • See MSDN: Migrating 32-bit Managed Code to 64-bit. Quote:

[...]考虑一个.NET应用程序   这是100%的安全类code。在这   场景就可以把你的   您运行在.NET可执行的   32位机,并将其移动到   64位系统,并运行它   成功。为什么这项工作?   因为大会是100%类型安全   我们知道,有没有相关性   原生code或COM对象和   不存在不安全code,这意味着   该应用程序完全运行   在CLR的控制。在CLR   保证了在二元code   即作为结果而产生的   刚刚在实时(JIT)编译会   在32位和64位的不同,   一个执行都将是code   语义相同。 [...]

"[...] Consider a .NET application that is 100% type safe code. In this scenario it is possible to take your .NET executable that you run on your 32-bit machine and move it to the 64-bit system and have it run successfully. Why does this work? Since the assembly is 100% type safe we know that there are no dependencies on native code or COM objects and that there is no 'unsafe' code which means that the application runs entirely under the control of the CLR. The CLR guarantees that while the binary code that is generated as the result of Just-in-time (JIT) compilation will be different between 32-bit and 64-bit, the code that executes will both be semantically the same. [...]"

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