Hacker News new | ask | show | jobs
by hughrr 1542 days ago
Spend some time looking at optimised compiler output on godbolt on both architectures. ARM has some really nice tricks up its sleeves.

I’ve been using ARM since about 1992 though so I may be biased.

1 comments

So does Intel ;)
Yes and no. Look at some of the loop optimisations possible on ARM compared to x86-64. I've had x86-64 run 8 instructions that ARM does in 1 instruction.
I remember PPC and its rlwinms and co. My ARM isn’t that good, though I can read it.

But some of those x86 instructions take 0.5 cycles and some of them take 0 if they’re removed by fusion or register renaming. It has worse problems, like loop instructions you can’t actually use but take up the shortest codes.

This applies equally well, or dare I saw even better, on x86. (Arm tends to catch up because of higher IPC.)