← Back to context

Comment by wmf

2 days ago

Better than x86 is a low bar when ARMv8 exists.

And personally, I'm not even sure it crosses that bar.

RISC-V somehow manages to be more fragmented than x86 (which is impressive), and just can't compete on instruction density.

I think a large part of the issue with RISC-V is that it predates (public knowledge of) ARMv8 by a year or two, so it couldn't use it as inspiration. If you compare RISC-V to 32-bit ARM, the comparisons are much more favourable.

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

    • 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.

      13 replies →

    • 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.

  • > think a large part of the issue with RISC-V is that it predates (public knowledge of) ARMv8 by a year or two

    Does it? https://people.eecs.berkeley.edu/~krste/papers/EECS-2016-1.p... has a section on ARMv8 (section 2.5)

    It says they became aware of it a year after they started the RISC-V project, but that’s five years before that paper was published.

    • 2015 is when it started to gain steam as a community run project.

      But version 1.0 of the spec [1] was released all the way back in May 2011, and the first RISC-V chip was taped out at the same time. This is 5 months before ARMv8 was even announced, and we didn't start seeing actual aarch64 chips until late 2013.

      And TBH, I'm not sure anyone realised just how good of an ISA aarch64 is until quite a bit later.

      RISC-V 1.0 isn't binary compatible with modern RISC-V, they hadn't frozen the encoding, but rough design is all there.

      [1] https://www2.eecs.berkeley.edu/Pubs/TechRpts/2011/Archive/EE...