As stated on Wikipedia:
Most modern computers are byte-addressable
instead of word-addressable. Why is this case? Since the CPU processes words (of predominantly 64 bits or 8 bytes) now, wouldn't the word-addressable approach be more efficient?
As stated on Wikipedia:
Most modern computers are byte-addressable
instead of word-addressable. Why is this case? Since the CPU processes words (of predominantly 64 bits or 8 bytes) now, wouldn't the word-addressable approach be more efficient?
Byte operations will always be important because a lot of a modern workload involves bytes. Text processing and bytecode interpretation (including emulation of other CPUs) are obvious examples, but also device drivers often need to be able to manipulate bytes efficiently.
Byte-addressed memory can be emulated with word-addressed memory and a reasonable assortment of bit manipulation instructions, however this means that you need more instructions to do the same thing, and those instructions have long chains of data dependencies between them.
RAM is reasonably cheap, but the instruction pipeline in a modern CPU is not.
Every so often, ISA designers reason that byte and short word load/store instructions aren't that important. Within two revisions, those instructions inevitably get added. This was the case with MIPS and Alpha, for example. Code density, it turns out, is quite important.
Note that this isn't true of arithmetic and logic operations. Given a sufficient number of registers (which, I might add, 32-bit x86 and earlier did not have), there doesn't seem to be any gain in implementing byte and short-word arithmetic and logic instructions. Well, for non-vectored instructions, anyway.
lb[u]
and sb
, and half-word store/load (also with sign or zero extension). Perhaps you're thinking of unaligned address support for lw
/ sw
in MIPS, obsoleting lwr
/ lwl
? (That wasn't guaranteed until MIP32/64 release 6 in 2014, though, according to Wiki. Specific implementations presumably had it, and that's fine for embedded software.)
$\endgroup$
Commented
Oct 13, 2017 at 3:38
In the end, what the CPU does when accessing data in cache is irrelevant, memory access is by cache line (i.e., 128 byte blocks for the Pentium 4).