WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126176
Add class matching to the Selector Code Generator
https://bugs.webkit.org/show_bug.cgi?id=126176
Summary
Add class matching to the Selector Code Generator
Benjamin Poulain
Reported
2013-12-23 12:52:38 PST
Add class matching to the Selector Code Generator
Attachments
Patch
(12.21 KB, patch)
2013-12-23 12:54 PST
,
Benjamin Poulain
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2013-12-23 12:54:46 PST
Created
attachment 219926
[details]
Patch
Antti Koivisto
Comment 2
2013-12-23 13:59:01 PST
Comment on
attachment 219926
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=219926&action=review
It might be good if someone who knows the marcoassembler would also take a look.
> Source/WebCore/cssjit/SelectorCompiler.cpp:209 > + HashSet<const AtomicStringImpl*> fragmentClassNames;
Repeating class names are probably very rare. It may be better to just use a vector and not care about removing duplicates.
Antti Koivisto
Comment 3
2013-12-23 14:08:12 PST
... with inline capacity. Even if duplicates are removed doing it in vector is likely still be much faster as there are rarely many entries. HashSets always malloc so are expensive.
Benjamin Poulain
Comment 4
2013-12-23 14:41:16 PST
(In reply to
comment #3
)
> ... with inline capacity. Even if duplicates are removed doing it in vector is likely still be much faster as there are rarely many entries. HashSets always malloc so are expensive.
This is compile time though so this code is very not hot.
Antti Koivisto
Comment 5
2013-12-23 14:54:59 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > ... with inline capacity. Even if duplicates are removed doing it in vector is likely still be much faster as there are rarely many entries. HashSets always malloc so are expensive. > > This is compile time though so this code is very not hot.
Compile time can matter as we may have large numbers of selectors. Rule analysis code during RuleData construction shows up in profiles (0.7% of PLT3) and is analogous to selector compiling.
Benjamin Poulain
Comment 6
2013-12-23 15:15:49 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (In reply to
comment #3
) > > > ... with inline capacity. Even if duplicates are removed doing it in vector is likely still be much faster as there are rarely many entries. HashSets always malloc so are expensive. > > > > This is compile time though so this code is very not hot. > > Compile time can matter as we may have large numbers of selectors. Rule analysis code during RuleData construction shows up in profiles (0.7% of PLT3) and is analogous to selector compiling.
Ok. I'll switch to a vector then.
Benjamin Poulain
Comment 7
2013-12-23 15:43:47 PST
Committed
r161031
: <
http://trac.webkit.org/changeset/161031
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug