3 ms·
Although I agree the compiler rarely produces great code automatically, it's normally possible to handhold the compiler into producing code roughly equivalent t
by Veedrac 10y ago
Although I agree the compiler rarely produces great code automatically, it's normally possible to handhold the compiler into producing code roughly equivalent to hand-written ASM. Doing so is rarely easier, but it is at least more portable!
- benchaney 10y agoCompilers don't use all instructions. For example crypto code often require assembly in order to take advantage of AES instructions.
- Veedrac 10y agoThat's what intrinsics are for.
- user5994461 10y agoGiven the comments, I would assume that the other commenters don't know about intrinsics, or embedding ASM code into C, or "handholding the compiler into producing great code".