by devit · 6y ago · 0 comments
How would optimized M1 assembly differ from optimized ARM assembly in general?
I imagine good ARM assembly code on a Gravitron2 or a Snapdragon chip would be similarly good on an M1 chip
Apple of course uses these things in the lower levels of their software, so if you're using their APIs you're getting this for free across OSes and CPUs.
[1] Even the family/model/stepping designation has an oddity: the 486 was family 4, the Pentium was family 5, and then everything from the Pentium II/III up to the latest Core series, as well as the Atoms, uses family 6; but the P4 was family 15.
Some things like the instruction density and inlining heuristics translate from processor to processor, but the actual microarchitecture (rather than the ISA) determine what is "good" code from platform to platform e.g. Good instruction scheduling depends on how the CPU is designed.
A14/M1 will come, but the question is when...