On Thu, Apr 12, 2018 at 04:30:07PM +0000, Wilco Dijkstra wrote:
> Jakub Jelinek wrote:
> > On Thu, Apr 12, 2018 at 03:53:13PM +0000, Wilco Dijkstra wrote:
> 
> >> The tailcall issue is just a distraction. Historically the handling of 
> >> mempcpy 
> >> has been horribly inefficient in both GCC and GLIBC for practically all 
> >> targets.
> >> This is why it was decided to defer to memcpy.
> >
> > I guess we need to agree to disagree.  But we have a P1 PR that we need to
> > resolve and it is one of the last 6 blockers we have.  I'm not suggesting to
> > revert PR70140, just let use mempcpy libcall if it is what the user wrote 
> > and
> > we aren't expanding it inline.
> 
> Frankly I don't see why it is a P1 regression. Do you have a benchmark that

That is how regression priorities are defined.

> >> So generally it's a good idea to change mempcpy into memcpy by default. 
> >> It's
> >> not slower than calling mempcpy even if you have a fast implementation, 
> >> it's faster
> >> if you use an up to date GLIBC which calls memcpy, and it's significantly 
> >> better
> >> when using an old GLIBC.
> >
> > mempcpy is quite good on many targets even in old GLIBCs.
> 
> Only true if with "many" you mean x86, x86_64 and IIRC sparc.

Depending on what you mean old, I see e.g. in 2010 power7 mempcpy got added,
in 2013 other power versions, in 2016 s390*, etc.  Doing a decent mempcpy
isn't hard if you have asm version of memcpy and one spare register.

        Jakub

Reply via email to