This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Should we remove all internal usages of bcopy/bzero?
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: Should we remove all internal usages of bcopy/bzero?
- From: Roland McGrath <roland at frob dot com>
- Date: Sun, 16 Sep 2001 21:18:19 -0400 (EDT)
- Cc: "H . J . Lu" <hjl at lucon dot org>,GNU C Library <libc-alpha at sourceware dot cygnus dot com>
> bcopy: yes. bzero: not really. There shouldn't be many bcopy uses
> left. And yes, there is a reason: one less PLT entry.
Another reason is that most bcopy calls don't need to handle overlap
and so can be memcpy instead of memmove and be a tiny bit cheaper.
For bzero, I wonder if it might not be worth having optimized memset
macros check __builtin_constant_p and == 0 and refer to the bzero code.