This is the mail archive of the libc-alpha@sources.redhat.com 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]

[PATCH] improve regex performance


Hello,

The performance of current implementation of regex has a problem,
if we use the re_search() interface in multibyte environments.

Attached patch can improve the performance by moving the conversion
(from multibyte to wchar) to re_search_2.

How about this patch?

If it is acceptable, the Changelog entry is like this:

2001-06-20 Isamu Hasegawa <isamu@yamato.ibm.com>

	* posix/regex.c(FREE_WCS_BUFFERS): New macro to free buffers.
	(re_search_2): invoke convert_mbs_to_wcs and FREE_WCS_BUFFERS.
	(wcs_re_match_2_internal): Check whether the wcs buffers need
	seting up or not, and skip seting up routin if not needed.

Thanks,
--
Isamu Hasegawa
IBM Japan, Ltd.

glibc-2.2.3-regex-performance.patch.gz


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