Show quoted text 8 lines
I just stumbled across this article about micro-architecture-specific
optimisations in ARM:
https://www.phoronix.com/news/ARM64-Linux-No-Uarch-Opts
They briefly mention x86_64, and I agree it's good to avoid
micro-architecture-specific optimisations and now it makes me wonder
where the line is drawn, like the recent introduction of the optimizer
hint regarding LEA instructions being slow on some middle-aged CPUs.
For general optimization, direct most of the effort on the most commonly used CPUs and architectures, while ensuring satisfactory performance for others. Allow specific optimizations for atypical cases, as long as they don't negatively impact the most common scenarios. Before investing much effort, check what optimizations will be accepted upstream (unless one is willing to maintain that code separately).