bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16912: [PATCH] no longer use CSET for non-UTF8 locale in DFA engine


From: Norihiro Tanaka
Subject: bug#16912: [PATCH] no longer use CSET for non-UTF8 locale in DFA engine
Date: Sat, 01 Mar 2014 18:48:22 +0900

Package: grep
Tags: patch

I have overlooked the important thing about optimization by
trivial_case_ignore.  After optimization by trivial_case_ignore,
kwset engine can be used yet.  However, if remove trivial_case_ignore,
it's never used longer because kwsmusts does nothing when MB_CUR_MAX > 1
&& match_icase.

The patch reverts removal of trivial_case_ignore and fixes 200x slower
for non-UTF8 locales with another approach.  It always prefers CSET to
replacement to OR and no longer use CSET for non-UTF8 locales in DFA
engine.

It can also optimize by trivial_case_ignore and enables to speed-up >20x
for non-UTF8 locales. (I tested it with euc-jp)

Norihiro

Attachment: patch.txt
Description: Binary data

Attachment: tests.txt
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]