Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 14780003: Speed improvements to SubstringSetMatcher (Closed)

Created:
7 years, 7 months ago by vabr (Chromium)
Modified:
7 years, 7 months ago
Reviewers:
battre
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Speed improvements to SubstringSetMatcher The main one is coputing the Aho-Corasick tree size in advance. Also contained are code clean-ups and minor optimisations, like removing HasEdge/GetEdge sequences, or adding const to aid compiler optimisations. This was tested on a benchmark adding 20k+ patterns. It showed a reduction of the running time by 30%. BUG=236368 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198803

Patch Set 1 : #

Total comments: 14

Patch Set 2 : Dominic's comments #

Total comments: 2

Patch Set 3 : Spare some tree_ traversing for consecutive common prefixes #

Patch Set 4 : Fixed and incomplete DCHECK #

Patch Set 5 : unsigned -> uint32 #

Patch Set 6 : Revert the tree_ traversing optimisation #

Total comments: 2

Patch Set 7 : sorted_patterns is now local, not a data member #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -55 lines) Patch
M extensions/common/matcher/substring_set_matcher.h View 1 2 3 4 5 6 4 chunks +15 lines, -11 lines 0 comments Download
M extensions/common/matcher/substring_set_matcher.cc View 1 2 3 4 5 6 10 chunks +106 lines, -44 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
vabr (Chromium)
Hi Dominic, This is what I have so far. I had a bit of trouble ...
7 years, 7 months ago (2013-05-03 20:37:26 UTC) #1
battre
For a single iteration, your CPU is probably still in throttled state. Given that this ...
7 years, 7 months ago (2013-05-03 21:59:12 UTC) #2
vabr (Chromium)
Hi Dominic, Thanks for your review. I revised my benchmark, and decided to use just ...
7 years, 7 months ago (2013-05-05 23:36:49 UTC) #3
vabr (Chromium)
Hi Dominic, I added the patch set which spares some traversing of tree_ for shared ...
7 years, 7 months ago (2013-05-06 08:44:12 UTC) #4
battre
Let's discuss this at the whiteboard. I am concerned that the additional complexity and memory ...
7 years, 7 months ago (2013-05-06 14:37:03 UTC) #5
vabr (Chromium)
On 2013/05/06 14:37:03, battre wrote: > Let's discuss this at the whiteboard. I am concerned ...
7 years, 7 months ago (2013-05-07 08:31:11 UTC) #6
vabr (Chromium)
Hi Dominic, PTAL. Vaclav For the record: Offline, Dominic and me agreed that the speed-up ...
7 years, 7 months ago (2013-05-07 12:49:27 UTC) #7
battre
one last thing https://codereview.chromium.org/14780003/diff/15002/extensions/common/matcher/substring_set_matcher.cc File extensions/common/matcher/substring_set_matcher.cc (right): https://codereview.chromium.org/14780003/diff/15002/extensions/common/matcher/substring_set_matcher.cc#newcode94 extensions/common/matcher/substring_set_matcher.cc:94: sorted_patterns_.resize(patterns_.size()); I think if you use ...
7 years, 7 months ago (2013-05-07 14:30:03 UTC) #8
vabr (Chromium)
Thanks, Dominic. PTAL. Vaclav https://codereview.chromium.org/14780003/diff/15002/extensions/common/matcher/substring_set_matcher.cc File extensions/common/matcher/substring_set_matcher.cc (right): https://codereview.chromium.org/14780003/diff/15002/extensions/common/matcher/substring_set_matcher.cc#newcode94 extensions/common/matcher/substring_set_matcher.cc:94: sorted_patterns_.resize(patterns_.size()); On 2013/05/07 14:30:03, battre ...
7 years, 7 months ago (2013-05-07 14:59:16 UTC) #9
battre
lgtm
7 years, 7 months ago (2013-05-07 15:14:24 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/14780003/41003
7 years, 7 months ago (2013-05-07 15:23:47 UTC) #11
commit-bot: I haz the power
7 years, 7 months ago (2013-05-07 21:41:36 UTC) #12
Message was sent while issue was closed.
Change committed as 198803

Powered by Google App Engine
This is Rietveld 408576698