05-10-2020, 04:28 AM
(05-09-2020, 09:33 AM)fams Wrote: This should be odd, because a reduced instruction set means more code needed for the same algorithm.
Pretty logic and that is what I learnt decades ago and kept in mind.
But I don't know if the actual ARM designs are really RISC compared to the ancient ones...
x86 instructions are often 5 bytes or more, while all ARM instructions are 4 bytes (except for Thumb mode where there are two-byte instructions). ARM also has more registers, so less instructions are needed to shuffle data to and from the stack.
I suspect that x86 compilers inline and unroll loops more aggressively because of the larger cache sizes, which would also make x86 code bigger.