Hi Adhemerval and Jianbo, I've customized string-fzi.h and string-maskoff.h for LoongArch (see attachment). With them on top of Adhermerval's v5 "Improve generic string routines" patch and GCC & Binutils trunk, the benchmark result seems comparable with the assembly version for strchr, strcmp, and strchrnul. By the way I've tried to unroll the loop in strchr manually, but then the compiler produced some bad thing (moving words from a register to another with no reason) and the result is slower. I've not really plotted the the result, just took a quick look with my eyes. You can try the bench with my headers in sysdeps/loongarch. > -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University