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] Optimize strchr (x, 0)


> 	* string/bits/string2.h: Add stplen macro.
> 	(rawmemchr) Optimize case rawmemchr(x, 0).
> 	(strchr) Use stplen.
> 	(strcat) Likewise.

Should be:

	* string/bits/string2.h (__stplen): New macro.
	[!_HAVE_STRING_ARCH_strchr] [!__GNUC_PREEQ (3, 2)] (strchr): Use it.
	[! HAVE_STRING_ARCH_strncat] [_USE_STRING_ARCH_strchr] (strncat):
	Likewise.
	[!_HAVE_STRING_ARCH_rawmemchr] (__rawmemchr): New macro;
	optimizes the case of searching for '\0'.


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