RESOLVED FIXED 53880
Use bloom filter for descendant selector filtering
https://bugs.webkit.org/show_bug.cgi?id=53880
Summary Use bloom filter for descendant selector filtering
Antti Koivisto
Reported 2011-02-06 10:14:57 PST
Bloom filter is faster than a hash set in this kind of use.
Attachments
implement a bloom filter and use it for selector filtering (17.17 KB, patch)
2011-02-06 10:44 PST, Antti Koivisto
no flags
attempted build fixes for various build systems (18.80 KB, patch)
2011-02-06 11:18 PST, Antti Koivisto
mjs: review+
Antti Koivisto
Comment 1 2011-02-06 10:44:46 PST
Created attachment 81415 [details] implement a bloom filter and use it for selector filtering Shark thinks this speeds up style matching by ~30% on sites with lots of descendant selectors.
WebKit Review Bot
Comment 2 2011-02-06 10:58:50 PST
Early Warning System Bot
Comment 3 2011-02-06 10:59:29 PST
Antti Koivisto
Comment 4 2011-02-06 11:18:10 PST
Created attachment 81416 [details] attempted build fixes for various build systems
WebKit Review Bot
Comment 5 2011-02-06 11:29:15 PST
Maciej Stachowiak
Comment 6 2011-02-06 12:07:30 PST
Comment on attachment 81416 [details] attempted build fixes for various build systems View in context: https://bugs.webkit.org/attachment.cgi?id=81416&action=review r=me with one minor comment > Source/JavaScriptCore/wtf/BloomFilter.h:77 > + char m_table[tableSize]; I'd suggest using "unsigned char" or uint8_t for this, since it's using char as a byte, not a character, and this avoids pain on platforms where char is signed by default.
Dimitri Glazkov (Google)
Comment 7 2011-02-06 12:11:27 PST
(In reply to comment #6) > (From update of attachment 81416 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=81416&action=review > > r=me with one minor comment > > > Source/JavaScriptCore/wtf/BloomFilter.h:77 > > + char m_table[tableSize]; > > I'd suggest using "unsigned char" or uint8_t for this, since it's using char as a byte, not a character, and this avoids pain on platforms where char is signed by default. Pls don't land as is -- breaks Chromium.
Dimitri Glazkov (Google)
Comment 8 2011-02-06 12:12:01 PST
(In reply to comment #7) > (In reply to comment #6) > > (From update of attachment 81416 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=81416&action=review > > > > r=me with one minor comment > > > > > Source/JavaScriptCore/wtf/BloomFilter.h:77 > > > + char m_table[tableSize]; > > > > I'd suggest using "unsigned char" or uint8_t for this, since it's using char as a byte, not a character, and this avoids pain on platforms where char is signed by default. > > Pls don't land as is -- breaks Chromium. Nevermind -- haven't seen the second patch :)
Antti Koivisto
Comment 9 2011-02-06 12:46:50 PST
Dimitri Glazkov (Google)
Comment 10 2011-02-06 13:22:50 PST
Antti Koivisto
Comment 11 2011-02-06 13:41:09 PST
I think I just won the webkit.
WebKit Review Bot
Comment 12 2011-02-06 14:29:09 PST
http://trac.webkit.org/changeset/77777 might have broken Qt Linux Release
Note You need to log in before you can comment on or make changes to this bug.