64 位/32 位的底层优势和劣势是什么? [英] What are the lower level advantages and disadvantages of 64-bit/32-bit?

查看:29
本文介绍了64 位/32 位的底层优势和劣势是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相信我们都听说过 64 位和 32 位这两个术语,但它们实际上是什么意思?

我很确定它们与内存地址的大小有关.在 64 位机器上,对对象的引用是 64 位.但我想再深入一点....

  1. 人们经常听到64 位机器"这个词.计算机的哪一部分实际上是针对位数的?处理器?操作系统?

  2. 拥有更大的内存地址有什么好处?

我可以添加更多问题,但我认为简短更好.

谢谢各位:D

解决方案

64 位指的是寄存器的宽度、内存寻址空间等.一个好处是能够寻址超过 4GB 的内存.

维基百科有一篇关于 64 位计算的文章,其中包含更多详细信息.>

更多内存的优势是操作系统和程序有更多的虚拟寻址空间——16 艾字节(172 亿 GB)——而且,更重要的是,更多的物理内存可以被添加到系统并寻址,从而减少虚拟内存与磁盘的交换.

更宽的寄存器和数据总线的优势在于可以更轻松、更快速地移动相同数量的数据.需要两个或更多寄存器的操作现在可以用一个来完成.

因此,当软件重新编译为 64 位时,性能通常会提高.

一个缺点是,更广泛的数据可能意味着相同数据占用更多空间.例如,存储数字 300 需要九位.如果以 32 位整数存储,则浪费了 23 位.在 64 位中,这种浪费变成了 55 位.因此,无需重新工具,简单地重新编译为 64 位可以生成更快但稍微臃肿的软件.

这里还有 64 位技术页面:

I'm sure we've all heard the terms 64bit and 32bit thrown around, but what do they actually mean?

I'm pretty sure they have to do with the size of a memory address. On a 64bit machine, a reference to an object is 64 bits. But I want to dig a little deeper....

  1. One often hears the phrase "64bit machine." What part of the computer is actually geared toward the number of bits? Processor? Operating System?

  2. What is the advantage of having larger memory addresses?

I could add more questions, but I think brief is better.

Thanks guys :D

解决方案

64 bit refers to the width of registers, memory addressing space, etc. One benefit is the ability to address more than 4GB of memory.

Wikipedia has an article on 64-bit computing with more details.

Edit: The advantages to more memory are that the operating system and programs have more virtual addressing space--16 exabytes (17.2 billion GB)--and, more importantly, that more physical memory can be added to a system and addressed, causing less swapping of virtual memory to and from disk.

The advantage to wider registers and data buses are that it is easier and faster to move the same amount of data around. An operation that required two or more registers can now be done with one.

So, performance is typically increased when software is recompiled for 64 bits.

A disadvantage is that wider data can mean more space taken by the same data. For instance storing the number 300 requires nine bits. If it's stored in a 32 bit integer, 23 bits are wasted. In 64 bit, that wastage becomes 55 bits. So, without retooling, a simple recompile to 64 bit can yield faster, but slightly more bloated software.

Edit: Also there are 64-bit technology pages here:

这篇关于64 位/32 位的底层优势和劣势是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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