This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make memset in calloc a tail call.


On Thursday 07 November 2013 15:39:46 Andrew Pinski wrote:
> On Thu, Nov 7, 2013 at 12:31 PM, OndÅej BÃlka <neleai@seznam.cz> wrote:
> > Hi, after reading a calloc code I found that we do not return memset
> > value. Unless compiler can recognize that memset result and return value
> > are same it will be used as normal call but a tail call is faster.
> 
> It can and does in 4.8 and above but that is after the tail call
> optimization happens.

i wonder if we should merge OndÅej's fix with a comment like "we can drop this 
after we require gcc-4.8+.  seems like an easy win for older compilers for no 
overhead on our side.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]