Why x86 is unfathomably bloated
7 points by abnercoimbre
7 points by abnercoimbre
Very reductive view. OS's will use instructions that userland doesn't. Numerical code will use stuff that "discrete/logic problem solving" code like LLVM doesn't. Highly tuned numerical code will use stuff that numerical code doesn't. Who knows what the heck JIT's will use.
Really, it doesn't say "why", just makes a claim with a tiny shred of evidence. That's not exactly a convincing argument, let alone good science. Do the same experiment on arm32, arm64 and risc-v and compare.
I've done this sort of thing before, a couple times, though I admit not with much more depth.
I did a similar analysis years ago. Most of instructions in a real program are dedicated to moving things between registers and memory, passing arguments, and calling functions. Complex instructions are quite rare.
Yep. I suspect they mostly make a difference in tight loops, but tight loops don't form most of a program's instruction count.
But all of these are measuring static instruction count, now that I think of it, which really is not what we usually care about. I would be interested to see something like one of these, but measure how many times each type of instruction is executed.
How important are those very used instructions though?
Not clear from that 1 liner if those are static binaries or it searches their whole closure of dynamic libraries.
AArch64 has a bunch of conditional move variants. One of them is rarely used, but cuts the dynamic instruction count of the hot loop in some compression algorithms by over 10%, while adding almost zero area overhead to implementations. An analysis like the one in the article would tell you that it’s a pointless instruction.
That is exactly my thinking; there is probably some principle that the most impactful instructions are probably the least used. (Pareto?)
This explains why x86 is so power-hungry compared to ARM or RISC-V.
The relative power consumption difference between something like x86 and arm are so multi-factorial putting it down to ISA encoding space bloat fells offensive.
What about the memory model? Who ever said the CPU core was the one consuming all the power? What about the micro-op cache?
Don't arm64 and powerpc64 have essentially the same magnitude (i.e. 1000) of instructions as amd64? And that has little to nothing to do with power efficiency.
Yep. I am not an expert but encoding complexity seems to be a bigger deal than just count. And the larger your chip is, the smaller instruction decoder is a smaller part of your chip in proportion.
Better to check Chromium, LibreOffice, etc. Any specialized software will be biased. Same for Unreal Engine, more math ops.
But yeah, dat make sense that x86 is huge now.