Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by kaba0 on Sunday July 09, 2023 @09:05AM
(#36654157)
Through in-built assembly, or some compiler-specific annotation. None of them is vanilla C, which was my point.
[ Parent
| on HN ]
Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by flohofwoe on Sunday July 09, 2023 @10:30AM
(#36654722)
Actual "standard C" (along with most of the C stdlib) is pretty much useless for writing real-world applications, any non-trivial C code base will almost certainly use at least a handful non-standard extensions (sometimes even without knowing it) and both compiler- and platform-specific conditional code paths (just try how many libraries would compile with gcc's "-pedantic" flag, I bet it's not all that many).
This pragmatism by compiler vendors to just ignore the C standard where it doesn't make much sense, and to extend the language where it helps to solve real-world problems is actually a pretty powerful argument for C.
Re:“C is quirky, flawed, and an enormous success” – Dennis R...
by dzaima on Sunday July 09, 2023 @10:50AM
(#36654910)
If you want truly high-performance, architecture-generic SIMD won't get you particularly far though - the utter mess of things that x86-64 does and doesn't support is an utter mess, and doing things well across fixed-width and variable-width SIMD architectures will require compromises on one of those quite often. (not at all to say that it's impossible, it's just quite full of asterisks that I personally think is too much to bother standardizing)