Re:Ask HN: Does anyone have something negative to say about ...
by Someone on Thursday July 26, 2018 @03:51AM
(#17615799)
If you start from scratch today, you better beat x86. x86 wastes instruction space for 8087 floating point operations, for vector extensions that have been superseded by better ones, requires prefixes to operate on what nowadays are standard argument sizes, etc.
Unfortunately, that which the headlines giveth, the implementation details taketh away.
The bulk of the savings come from loads and stores to the stack. The remainder of the savings is for destructive integer ops on a subset of only 8 registers.
So sure, if your code can be efficiently described using those restrictions, then you'll have great code density! Many commercial codes do have short stretches that fit this requirement, but they are interspersed with stretches that don't.
This makes it very hard to produce an effective code size benchmark for RISC-V, because it is so heavily load dependent.