Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5021

Beginners • Re: Where can I find books on optimising ARM assembly code by hand?

$
0
0
There is a saying that premature optimisation is the root of all evil.

Basically, learn to walk before you run. It is an exceptional ARM programmer who can outperform a modern compiler.

Just as a data point, I've been programming professionally for over 40 years. I haven't had to write in optimised assembler in the last 30, and its only recently I have had to write any sort of assembler, and that was using the PIO on the RP2040.
I mean, "modern compiler" can mean all sorts of things, right? Wouldn't a cheap compiler not work as well as a more expensive one?
GCC, the free C/C++ compiler that comes with Pi OS has a very good optimiser backend, as does CLang, also free I believe.GCC or CLang must account for the vast majority of published Linux applications. We use GCC for everything including our kernel builds.
When I was a young programmer, many decades ago; we used to spend a lot of time optimising solutions.....Then hardware became cheaper and compilers became better. In parallel; programmers became more expensive. The result is that now; we tend to throw hardware at problems rather than manpower.

Statistics: Posted by kip_the_elder — Sun Dec 29, 2024 11:44 am



Viewing all articles
Browse latest Browse all 5021

Trending Articles