logoalt Hacker News

monocasatoday at 2:49 AM2 repliesview on HN

Everything I've seen is that rv64gc is very competitive with aarch64 wrt code density.


Replies

phiretoday at 3:26 AM

The fact that it's only "competitive" with aarch64's code density is a solid black mark against RISC-V.

The only reason it's "competitive" is the compressed instructions, which means it's paying all the costs of variable length instructions, yet only getting marginal benefits. IMO a modern ISA taking advantage of variable length instructions should be able to absolutely smash the code density of a fixed width ISA like aarch64. At minimum, it should be competitive with x86 code density, if not smashing that too (because x86 has a lot of legacy baggage)

Compressed instructions aren't a bad idea for very small cores. They give you a decent code density boost with minimal added complexity.

But for large cores you either want to go full fixed length (like AArch64 and Qualcomm's proposal, which bought non-compressed RISC-V into the range of AArch64) or adopt a much more complex variable length scheme that can actually beat x86 on code density.

show 1 reply
wmftoday at 3:17 AM

The article makes the case that RISC-V achieved code density the wrong way. Instead of compressed instructions, ARM has fixed-size instructions with richer semantics.