[PATCH] improve regex performance

Isamu Hasegawa isamu@yamato.ibm.com
Thu Jun 21 00:53:00 GMT 2001


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-2.2.3-regex-performance.patch.gz
Type: application/x-gzip
Size: 2811 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010621/60c4ef50/attachment.bin>


More information about the Libc-alpha mailing list