4 ms·
Of course, use whatever you prefer. But the techniques I listed, which Linux kernel (and other software) relies on for performance, can't be done in C, can't b
by jlokier 6y ago
Of course, use whatever you prefer.
But the techniques I listed, which Linux kernel (and other software) relies on for performance, can't be done in C, can't be done with compiler intrinsics, and can't be done with basic asm in the style of DMD and MSVC either.
A feature to add new program-specific intrinsics to the compiler would work, but I don't know of any compiler which offers that, and it would probably look like extended asm anyway.
The GCC syntax isn't pretty. But I can't agree that it's inferior unless someone points to a better alternative that achieves similar results.
I've written programs that were portable to both GCC and MSVC, using the inline asm syntax of both compilers. The MSVC version produced slower code, because there was no way to produce the asm I wanted using MSVC.
- pjmlp 6y agoIf you cannot write the Assembly you want there is certainly a problem. /s
- jlokier 6y ago:-) Well it turns out I can't, and neither can anyone else if they are looking for the fastest performance, because the fastest assembly depends on the context it is called from. I had this problem going all the way back to the 8-bit machines, which is why I took an interest in compilers and dynamic code generation. To get the best :-)