64位系统的优点 [英] Advantages of a 64 bit system

查看:23
本文介绍了64位系统的优点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从开发人员的角度,我想了解 64 位系统的卖点是什么?

From a developer perspective i am trying to understand , what is the selling point of a 64-bit system ?

我知道您可以使用更多寄存器,可以为进程分配更多内存,但我无法理解是什么让开发人员的生活更轻松.有什么例子吗?

I understand that more registers are at your disposal , more memory can be allocated to a process , but i cannot understand what makes a developer's life easier. Any examples ?

从性能的角度来看,如果程序在 32 位和 64 位上运行,是否有任何收益?

From a performance perspective are there any gains seen if a program is run on a 32bit vs 64 bit ?

干杯!

感谢您的所有回复.我看到一些针对最终用户体验的对话,尽管它可能很重要......我更多地关注您可以挤出的任何架构优势.

EDIT : Thank you for all your replies. I see some conversations shooting towards end user experience , important as it may be.. I am looking more at any architectural benefits that you can squeeze out.

据我所知,优化似乎是在编译器-汇编器链上进行的,而不是程序员可以调用的功能?

From what i understand , it looks like the optimizations are a lot at the compiler-assembler chain rather than a functionality which a programmer can call on ?

推荐答案

当您有 64 位地址空间可供使用时,您可以采用某些设计,这些设计在地址空间较少的情况下会非常困难.例如,最近一位朋友向我指出,线程堆栈的地址空间可能会成为 32 位系统上数千个线程的问题.但是在 64 位系统上,这甚至不再是一个问题.这是开发人员的主要直接好处,可以影响您编写程序的方式.不管机器有多少实际内存,这都是正确的.

When you have 64-bits of address space to play with, you can adopt certain designs that would be very hard with less of an address space. For example, a friend recently pointed out to me that address space for thread stacks can get to be a problem with thousands of threads on a 32-bit system. But on a 64-bit system, this is no longer even remotely close to being a problem. This is the main direct benefit to developers that can affect how you write programs. And this is true regardless of how much actual memory the machine has.

我见过的大多数转换为 64 位的程序都看到了性能提升,因为有额外的寄存器可用.

Most programs I have seen converted to 64-bit have seen performance improvements because of the extra registers available.

在某些程序中,拥有 64 位地址可以抵消这种性能改进.额外的空间指针占用意味着它们占用更多的缓存,从而在缓存中为其他事物留下更少的空间.此外,它们在与主存储器之间传输时会占用更多的内存总线带宽.

Having 64-bit addresses can offset this performance improvement in some programs. The extra space pointers take up mean they take more cache, which leaves less space in your cache for other things. Also they take up more memory bus bandwidth when being transferred to and from main memory.

至少有一个项目建议以一种混合模式重新编译 Linux 中的大多数程序,其中使用所有额外的寄存器,但仅使用 32 位指针.我对它的结果很感兴趣,因为它消除了 64 位程序的一个性能劣势.

There is at least one project out there that proposes to recompile most programs in Linux in a sort of mixed-mode in which all the extra registers are used, but only 32-bit pointers are used. I'm interested in how this pans out because it removes the one performance disadvantage of 64-bit programs.

还有一小部分(但很重要)的程序和算法可以使用 64 位寄存器.例如,大多数 SHA-3 候选旨在利用在进行按位运算时一次处理 64 位数据的能力.

There is also a small (but important) subset of programs and algorithms that can make use of 64-bit registers. For example, most of the SHA-3 candidates are designed to take advantage of the ability to manipulate 64-bits of data at a time when doing bitwise operations.

最后,由于 CPU 内部的数据路径现在是 64 位宽,这也可能意味着 CPU 内部有更多带宽用于移动事物.但我希望这对以 32 位模式运行的 64 位 CPU 也有好处.

Lastly, since the data paths inside the CPU are now 64-bits wide, this can also mean there is more bandwidth inside the CPU for moving things around. But I would expect this to be a benefit on 64-bit CPUs running in 32-bit mode as well.

这篇关于64位系统的优点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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