Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2023-11

Interesting short article about optimisation

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

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.

Kit

Reply by email

Adriaan van Os
to J. Gareth Moreton
J. Gareth Moreton wrote 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.

I agree that kind of optimization shouldn't be in a kernel. Whether it should be in a compiler is another question.

Regards,

Adriaan van Os

Reply by email

Wayne Sherman
to J. Gareth Moreton: I just stumbled across this article about micro-architecture-specific optimisations in…
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).

Reply by email