WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
154674
Consider using a jump table in element factories
https://bugs.webkit.org/show_bug.cgi?id=154674
Summary
Consider using a jump table in element factories
Ryosuke Niwa
Reported
2016-02-25 03:22:34 PST
Created
attachment 272199
[details]
WIP We've always said that it's silly to be using HashMap for looking up the atomic string name. Here's a super crude prototype of using alphabet jump table & one-level binary search. This appears to be ~0.5% improvement on PerformanceTests/Bindings/create-element.html but this test only creates div so we need a more comprehensive testing.
Attachments
WIP
(13.08 KB, patch)
2016-02-25 03:22 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
WIP
(16.01 KB, patch)
2016-02-25 19:35 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
WIP2
(33.90 KB, patch)
2018-03-22 23:55 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
WIP3
(37.62 KB, patch)
2018-03-23 01:26 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
WIP4 (fixed build)
(35.32 KB, patch)
2018-03-23 14:57 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2016-02-25 19:35:14 PST
Created
attachment 272281
[details]
WIP Here's a new WIP patch with tests. I was observing a consistent 1-2% gain but I'm no longer seeing that now :( I don't know whether my testing was busted. I'm somehow seeing a lot more variance on my test results now.
Ryosuke Niwa
Comment 2
2018-03-22 23:55:41 PDT
Created
attachment 336357
[details]
WIP2
Ryosuke Niwa
Comment 3
2018-03-23 01:26:12 PDT
Created
attachment 336359
[details]
WIP3 With this patch, we avoid creating AtomicString when creating built-in HTML elements in the HTML parser & createElement. In the case of createElement, we also avoid lowercasing the string.
EWS Watchlist
Comment 4
2018-03-23 01:28:05 PDT
Attachment 336359
[details]
did not pass style-queue: ERROR: Source/WebCore/dom/TagNameLookupTable.h:26: Use #pragma once instead of #ifndef for header guard. [build/header_guard] [5] ERROR: Source/WebCore/dom/TagNameLookupTable.cpp:29: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/parser/AtomicHTMLToken.h:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 3 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Ryosuke Niwa
Comment 5
2018-03-23 14:57:55 PDT
Created
attachment 336429
[details]
WIP4 (fixed build)
Ryosuke Niwa
Comment 6
2018-03-23 20:28:20 PDT
Hm... this appears to be an overall regression in Speedometer because there are enough non-standard attributes set. I guess we won't do this.
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