Re: libiberty: Don't needlessly clear xmemdup allocated memory

2016-05-29 Thread DJ Delorie
Ok then. Thanks!

Re: libiberty: Don't needlessly clear xmemdup allocated memory

2016-05-29 Thread Alan Modra
On Sat, May 28, 2016 at 10:12:19PM -0400, DJ Delorie wrote: > > Alan Modra writes: > > * xmemdup.c (xmemdup): Use xmalloc rather than xcalloc. > > In glibc at least, calloc can be faster than memset if the kernel is > pre-zero-ing pages. Thus, in those cases, your change makes the code > sl

Re: libiberty: Don't needlessly clear xmemdup allocated memory

2016-05-28 Thread DJ Delorie
Alan Modra writes: > * xmemdup.c (xmemdup): Use xmalloc rather than xcalloc. In glibc at least, calloc can be faster than memset if the kernel is pre-zero-ing pages. Thus, in those cases, your change makes the code slower by adding an unneeded memset. Have you considered these cases?