4 ms·
How many cache misses are for program instructions, versus data misses?
by Buttons840 5y ago
How many cache misses are for program instructions, versus data misses?
- anarazel 5y agoIME icache misses are a frequent bottleneck. There's plenty code where all the time is spent in one tight inner loop and thus the icache is not a constraint, but there's also a lot of cases with a much flatter profile. Where icache misses suddenly become a serious constraint.
- imtringued 5y agoObtaining the carry bit does not involve branches though. Overflow checking probably does.
- alerighi 5y agoDepends on the application. But even if they are few, it's not a good reason to have them just for having a nice instruction set, that if you are not writing assembly by hand (and nobody does these days) doesn't give you any benefit. Also don't reason with the desktop or server use case in mind, where you have TB of disk and code size doesn't matter. RISC-V is meant to be used also for embedded systems (in fact their use nowadays is only for these systems), where usually code size matter more than performance (i.e. you typically compile with -Os). In these situations more instructions means more flash space wasted, meaning you can fit less code.
- rbanffy 5y ago> that if you are not writing assembly by hand (and nobody does these days) doesn't give you any benefit. An elegant architecture is easier to reason about. Compilers will make fewer wrong decisions, fewer bugs will be introduced, and fewer workarounds will need to be implemented. An architecture that's simple to reason about is an invaluable asset.