String.compareTo() ends up in memcmp16() which is provided as assembler for all other target architectures, with only riscv64 falling back to the portable C version. it's possible that autovectorization is already doing a good enough job here that it doesn't matter, but someone should probably take a look and confirm/deny that.