This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Do not multiply by zero in bzero.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 22 Mar 2013 11:08:50 -0700 (PDT)
- Subject: Re: [PATCH] Do not multiply by zero in bzero.
- References: <20130321162026 dot GA16603 at domone dot kolej dot mff dot cuni dot cz>
bzero is a rarely-used compatibility entry point in this century.
So I don't think it's really worthwhile to microoptimize bzero per
se. It's far more common to call memset with a zero fill value. So
if that case is suboptimal then that's the place to optimize, and if
the optimization is significant then it is probably worthwhile for
memset to detect zero fill as a special case.
Thanks,
Roland