https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809
--- Comment #24 from Qing Zhao <qing.zhao at oracle dot com> --- From the above, we can see: even with n is as big as 20, inlined version is much faster than the non-inlined version, both on aarch64 (no hardware string compare insn provided) and X86 (hardware string compare insn provided) So, it's reasonable to do the inline as much as possible.