[PATCH] elf: Replace memcmp with __memcmpeq for variable size

H.J. Lu hjl.tools@gmail.com
Mon Feb 7 13:27:55 GMT 2022


On Mon, Feb 7, 2022 at 5:19 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> >> This must be something else.  According to the numbers, we save ~159
> >> between ~569 cycles per __memcmpeq call.  That is just not realistic.
> >
> > I removed the cycle info from the commit log.
>
> If we can't show the change is beneficial, is it worth the additional
> 1000 or so bytes in the loader text?
>

$ LD_DEBUG=statistics elf/tst-relsort1 --direct

does show improvements when __memcmpeq is called 24 times.
But the cycle number changes for each run.  The overall trend is
faster.  It will be more obvious when memcmp is called more often.

-- 
H.J.


More information about the Libc-alpha mailing list