News for hackers. Stuff that matters.
Re:Why is Rosetta 2 fast? by astrange on Wednesday November 09, 2022 @04:13PM (#33537931)
> gcc and clang at least have options so you can optimize for specific CPUs. I'm not sure how good they are

They are not very good at it, and can't be. You can look inside them and see the models are pretty simple; the best you can do is optimize for the first step (decoder) of the CPU and avoid instructions called out in the optimization manual as being especially slow. But on an OoO CPU there's not much else you can do ahead of time, since branches and memory accesses are unpredictable and much slower than in-CPU resource stalls.

There are no comments on this comment yet.