我正在阅读 "Introduction to Algorithms" , 第三版。在“分析算法”部分下写道:
We also assume a limit on the size of each word of data. For example when working with inputs of size n, we typically assume that integers are represented by c lg n bits for some constant c>=1. We require c>=1 so that each word can hold the value of n, enabling us to index the individual input elements, and we restrict c to be a constant so that the word size doesn't grow arbitrarily.
这里的“字”字是什么意思?这是用“词”表示数据的标准吗?
最佳答案
它们表示一个机器词;基本上是处理器寄存器的大小,或者该机器的一段数据的“最自然大小”。对于 32 位机器,它是 32 位;对于 64 位机器,它是(毫不奇怪)64 位。
随着计算机体系结构的发展,字的大小过去变得更加可变。如果你看this Wikipedia article关于字长,您会看到指向 12 位、18 位、21 位、24 位、31 位、36 位、48 位和 60 位硬件描述的链接。我记得曾经读过有关 72 位机器的文章,尽管我现在找不到引用资料。
关于algorithm - "word"在分析计算机算法中的意义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11493565/