3 ms·
About the housekeeping overhead in PowerPC machine code generated by the C compiler: > This, combined with the (correct) practice of modularizing everything i
by mwcampbell 7y ago
About the housekeeping overhead in PowerPC machine code generated by the C compiler:
> This, combined with the (correct) practice of modularizing everything into small subroutines that don't individually do much, produces very long programs dominated by instructions that don't do anything we care about.
I wonder how much of this was due to the RISC nature of the PowerPC instruction set and how much was the relative inefficiency of compiler code generation. For a fairly recent ISA like RISC-V or ARM64, with a modern compiler like clang, are things now better or worse? I imagine link-time optimization helps some.
- saagarjha 7y agoBoth, probably. The CISC certainly would have made shorter, and since it was hand-written it would probably do much better than the compilers of the day.