4 ms·
We should never write x86 off when there are billions behind it and variable length instructions have their advantages as well, such as code density, which may
by tambourine_man 4y ago
We should never write x86 off when there are billions behind it and variable length instructions have their advantages as well, such as code density, which may come to play an important role again in the future.
But it is much easier to simply chop off a stream of instructions at every X bits than to evaluate a portion and decide what to do later and that difference get larger the wider you go.
- cesarb 4y ago> variable length instructions have their advantages as well, such as code density Variable length instructions in general do have a code density advantage, but x86 is a particularly poor example. For historical reasons, it wastes short encodings with rarely used things like BCD adjustment instructions, and on 64 bits often requires an extra prefix byte. The RISC-V developers did a size comparison when designing their own compressed ISA, and the variable-length x86-64 used more space than the fixed-length 64-bit ARM; for 32 bits, ARM's variable-length Thumb2 was the winner (see page 14 of https://riscv.org/wp-content/uploads/2015/06/riscv-compressed-workshop-june2015.pdf https://riscv.org/wp-content/uploads/2015/06/riscv-compresse...).
- tambourine_man 4y agoNice, thanks. I didn’t know x86 was that bad in this regard.