https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809
--- Comment #8 from Wilco <wdijkstr at arm dot com> --- > /home/qinzhao/Install/latest/bin/gcc -O2 t_p_1.c t_p.c > non-inlined version > 20.84user 0.00system 0:20.83elapsed 100%CPU (0avgtext+0avgdata > 360maxresident)k > 0inputs+0outputs (0major+135minor)pagefaults 0swaps > > From the data, we can see the inlined version of strcmp (by glibc) is much > slower than the direct call to strcmp. (this is for size 2) > I am using GCC farm machine gcc116: This result doesn't make sense - it looks like GCC is moving the strcmp call in the 2nd case as a loop invariant, so you're just measuring a loop with just a subtract and orr instruction...