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] Do not multiply by zero in bzero.


> On my computer probability of memset doing zero fill is 97.016% .

Not surprising.

> We currently expand constant zero fill to bzero like in
> string/bits/string2.h which is roughtly

I wasn't thinking about this.  You said bzero rather than __bzero,
so I had in mind the source interface rather than the underlying symbol.

I think it's entirely reasonable to have the optimization for the common
case of constant zero fill be done in the header file rather than in the
memset assembly code.  Hence your optimization focus is indeed appropriate.

Thanks for the clarification.  It would streamline the review process in
future if you always lay out such issues clearly when first proposing a
change.


Thanks,
Roland


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