Summary: | Make CSSLonghandProperty use a lookup table instead of a hash map. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Luke Macpherson <macpherson> | ||||||||||
Component: | New Bugs | Assignee: | Luke Macpherson <macpherson> | ||||||||||
Status: | RESOLVED WONTFIX | ||||||||||||
Severity: | Normal | CC: | dglazkov, macpherson, menard, webkit.review.bot | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Luke Macpherson
2012-03-19 18:36:01 PDT
Created attachment 132740 [details]
Patch
Hi Alexis, here is another idea for how you might do it. This way gives minimal code changes, while giving us very fast lookup performance. Comment on attachment 132740 [details] Patch Attachment 132740 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/11995065 Created attachment 132761 [details]
Patch
Comment on attachment 132761 [details] Patch Attachment 132761 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11995118 Created attachment 132770 [details]
Patch
Comment on attachment 132770 [details] Patch Globally I feel https://bugs.webkit.org/show_bug.cgi?id=81587 much easier to read. Do you mind comparing the lookup table with your switch-based implementation? I'm expecting that a straight lookup table like this will be slightly faster than the switch, and both should be faster than the existing HashMap, but it will be interesting to see. (In reply to comment #7) > (From update of attachment 132770 [details]) > Globally I feel https://bugs.webkit.org/show_bug.cgi?id=81587 much easier to read. Do you mean because of the singleton pattern? You could easily hide that behind the same single static function and not change the interface at all. Created attachment 132929 [details]
Hide singleton pattern behind inline static function
|