|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#16842: closed ([PATCH] Use mbrtowc_cache in DFA engine) |
Date: | Fri, 28 Mar 2014 16:37:02 +0000 |
Your message dated Fri, 28 Mar 2014 09:36:11 -0700 with message-id <address@hidden> and subject line Re: bug#16842: [PATCH] Use mbrtowc_cache in DFA engine has caused the debbugs.gnu.org bug report #16842, regarding [PATCH] Use mbrtowc_cache in DFA engine to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 16842: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16842 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: [PATCH] Use mbrtowc_cache in DFA engine Date: Sun, 23 Feb 2014 00:46:27 +0900 Package: grep Tags: patch The patch is DFA version of patch#16544 "Optimazation for is_mb_middle". It will improve performance for non-UTF8 locales in DFA engine. I tested below. In both case, Speed-up 3-3.5x. $ yes $(printf '%078dm' 0)|head -1000000 > in $ for i in `seq 5`; do env LC_ALL=ja_JP.eucJP time src/grep n in; done $ yes jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj | head -1000000 > k $ for i in `seq 5`; do env LC_ALL=ja_JP.eucJP time src/grep -i foobar k; done Norihirouse_mb_cache_in_dfa.txt
Description: Binary datatests.txt
Description: Binary data
--- End Message ---
--- Begin Message ---Subject: Re: bug#16842: [PATCH] Use mbrtowc_cache in DFA engine Date: Fri, 28 Mar 2014 09:36:11 -0700 Thanks for the review and the fixes. I found a couple more things. First, it's not portable to cast wint_t * to wchar_t *, since the pointed-to types might be different sizes or representations. Second, we can put the cache directly in the struct dfa, saving the overhead of doing a separate malloc. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 The attached further patch should address these problems. I pushed this, along with the earlier two patches in this sequence, and am marking this as done.0003-dfa-avoid-an-indirection-and-port-wint_t-usage.patch
Description: Text Data
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |