RESOLVED WONTFIX81611
Make CSSLonghandProperty use a lookup table instead of a hash map.
https://bugs.webkit.org/show_bug.cgi?id=81611
Summary Make CSSLonghandProperty use a lookup table instead of a hash map.
Luke Macpherson
Reported 2012-03-19 18:36:01 PDT
Make CSSLonghandProperty use a lookup table instead of a hash map.
Attachments
Patch (19.04 KB, patch)
2012-03-19 18:36 PDT, Luke Macpherson
no flags
Patch (19.04 KB, patch)
2012-03-19 22:36 PDT, Luke Macpherson
no flags
Patch (18.98 KB, patch)
2012-03-19 23:47 PDT, Luke Macpherson
no flags
Hide singleton pattern behind inline static function (16.26 KB, patch)
2012-03-20 17:01 PDT, Luke Macpherson
no flags
Luke Macpherson
Comment 1 2012-03-19 18:36:46 PDT
Luke Macpherson
Comment 2 2012-03-19 18:38:39 PDT
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.
Build Bot
Comment 3 2012-03-19 21:39:12 PDT
Luke Macpherson
Comment 4 2012-03-19 22:36:19 PDT
WebKit Review Bot
Comment 5 2012-03-19 23:23:48 PDT
Comment on attachment 132761 [details] Patch Attachment 132761 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11995118
Luke Macpherson
Comment 6 2012-03-19 23:47:14 PDT
Alexis Menard (darktears)
Comment 7 2012-03-20 00:09:57 PDT
Comment on attachment 132770 [details] Patch Globally I feel https://bugs.webkit.org/show_bug.cgi?id=81587 much easier to read.
Luke Macpherson
Comment 8 2012-03-20 15:42:26 PDT
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.
Luke Macpherson
Comment 9 2012-03-20 15:46:07 PDT
(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.
Luke Macpherson
Comment 10 2012-03-20 17:01:04 PDT
Created attachment 132929 [details] Hide singleton pattern behind inline static function
Note You need to log in before you can comment on or make changes to this bug.