I don’t think you’ve looked at LLVM libc’s string routines if you think it’s “written in straightforward C++ under the belief that the compiler does…a good job”. It’s basically an assembly DSL
I think I know vaguely what you mean. But LLVM still tries to contain the asm to the minimal, innermost performance-sensitive place where it needs to go, if it needs to be there at all, and they use intrinsics whenever possible instead of asm statements. Compare LLVM and GNU strlen. In LLVM, the logic of the function is mostly in readable code, and the way to select the target ISA makes sense. In GNU, it's 100% assembly and the target ISA is involved in scattered preprocessor directives.
I think I know vaguely what you mean. But LLVM still tries to contain the asm to the minimal, innermost performance-sensitive place where it needs to go, if it needs to be there at all, and they use intrinsics whenever possible instead of asm statements. Compare LLVM and GNU strlen. In LLVM, the logic of the function is mostly in readable code, and the way to select the target ISA makes sense. In GNU, it's 100% assembly and the target ISA is involved in scattered preprocessor directives.