[Webkit-unassigned] [Bug 20180] Firefox is faster than webkit on :nth-child tests on SlickSpeed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 8 03:08:41 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20180





------- Comment #1 from catfish.man at gmail.com  2008-09-08 03:08 PDT -------
Created an attachment (id=23244)
 --> (https://bugs.webkit.org/attachment.cgi?id=23244&action=view)
Exploratory patch

This patch caches the results of parsing the an+b expression in CSSSelector.
The upside is obvious, the downside is that it adds two ints and a 1 bit flag
(which should fit in the leftover bit from the enums) to CSSSelector. Please
ignore lack of changelog, tabs, etc... this is just a "hey it's 1 AM and this
sounds interesting" patch.

Suggestions on ways to avoid increasing the size of CSSSelector are welcome,
although the comments indicate that it may be tricky/impossible :/

New numbers (same machine, but now based on r36246)

div:nth-child(even)     36 ms | 106 found
div:nth-child(2n)       36 ms | 106 found
div:nth-child(odd)      37 ms | 137 found
div:nth-child(2n+1)     36 ms | 137 found
div:nth-child(n)        39 ms | 243 found


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list