Bloom filter is faster than a hash set in this kind of use.
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.
Attachment 81415 [details] did not build on chromium: Build output: http://queues.webkit.org/results/7701641
Attachment 81415 [details] did not build on qt: Build output: http://queues.webkit.org/results/7708114
Created attachment 81416 [details] attempted build fixes for various build systems
Attachment 81415 [details] did not build on chromium: Build output: http://queues.webkit.org/results/7699787
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.
(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.
(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 :)
http://trac.webkit.org/changeset/77777 (!!!!1)
(In reply to comment #9) > http://trac.webkit.org/changeset/77777 (!!!!1) !!!!!
I think I just won the webkit.
http://trac.webkit.org/changeset/77777 might have broken Qt Linux Release