RISC-V Microcontrollers DISCUSSION

Does enabling compressed RISC-V instructions always make firmware faster?

Started by neville RISC-V compressed instructionscode sizeinstruction fetchperformance measurementcompiler options
3 replies 248 views 4 participants
Latest activity · 27 Sep 2026

Does enabling compressed RISC-V instructions always make firmware faster?

neville RISC-V Microcontrollers Forum
#1

Community replies 3

Re: Does enabling compressed RISC-V instructions always make firmware faster?

#2

Compressed encodings can reduce instruction storage and fetch demand for eligible operations, but they do not make every operation execute in fewer cycles. Confirm that the chosen core and compiler configuration support the relevant extensions and keep the optimization level consistent between comparisons.

Re: Does enabling compressed RISC-V instructions always make firmware faster?

#3

Measure the actual workload from its deployed memory location. Flash wait states, instruction-fetch behavior, branch patterns and alignment can influence timing. A tiny loop running from RAM may not reflect a larger application executing from external or slower memory.

Re: Does enabling compressed RISC-V instructions always make firmware faster?

#4

Compare text size, peak stack use and worst-case timing with identical inputs. Inspect disassembly to understand a surprising result instead of inferring speed from binary size. Keep the smaller build if it meets the timing requirement, even when the main benefit is memory rather than CPU time.

TEP COMMUNITY