I disagree here. It is reasonably easy to mix assembler and C if there’s a clear reason for doing it.
Examples:
Kernel code doing exciting stuff with the Translation Lookahead Buffer. That kind of low-level stuff if too low level even for C, but the relevant kernel code has inline assembler.
Software defined radio doing vector operations for the performance critical digital filter. Now, gnuradio is having to do an excitingly difficult version of this because:
a. The software has to work in Intel. ARM, MIPS, RISC-V. b. Which vector operations the cpu supports is only known at run time.
So here, the performance critical routines have to e it’s not just for each target architecture, but also in multiple versions for each target architecture depending on level of vector support. (Does it support RISC-V vectorization of floating point? Does it support RISC-V vectorization of bit manipulation?)
And so at run time you need to substitute in the appropriate implementation depending on which cpu features thr kernel reports. But it’s all do-able.
I disagree here. It is reasonably easy to mix assembler and C if there’s a clear reason for doing it.
Examples:
Kernel code doing exciting stuff with the Translation Lookahead Buffer. That kind of low-level stuff if too low level even for C, but the relevant kernel code has inline assembler.
Software defined radio doing vector operations for the performance critical digital filter. Now, gnuradio is having to do an excitingly difficult version of this because:
a. The software has to work in Intel. ARM, MIPS, RISC-V.
b. Which vector operations the cpu supports is only known at run time.
So here, the performance critical routines have to e it’s not just for each target architecture, but also in multiple versions for each target architecture depending on level of vector support. (Does it support RISC-V vectorization of floating point? Does it support RISC-V vectorization of bit manipulation?)
And so at run time you need to substitute in the appropriate implementation depending on which cpu features thr kernel reports. But it’s all do-able.
But your general point is probably valid.
Most programmers cant be bothered to write assembler unless there’s a really big performance gain to be had
This is likely to become true for writing high level languages instead of prompts. Too much work for too little gain, except in rare cases.