WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
95276
HTMLTokenizer should use the latest EfficientStrings hotness
https://bugs.webkit.org/show_bug.cgi?id=95276
Summary
HTMLTokenizer should use the latest EfficientStrings hotness
Adam Barth
Reported
2012-08-28 18:28:15 PDT
HTMLTokenizer should use the latest EfficientStrings hotness
Attachments
Patch
(3.93 KB, patch)
2012-08-28 18:29 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch
(2.54 KB, patch)
2012-08-28 18:39 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2012-08-28 18:29:28 PDT
Created
attachment 161111
[details]
Patch
Eric Seidel (no email)
Comment 2
2012-08-28 18:33:51 PDT
Comment on
attachment 161111
[details]
Patch This still causes a malloc. YOu could do this as part of the DEFINE_STATIC_LOCAL call however.
Adam Barth
Comment 3
2012-08-28 18:39:07 PDT
Created
attachment 161112
[details]
Patch
Adam Barth
Comment 4
2012-08-28 18:40:01 PDT
If we're going to do this inside the DEFINE_STATIC_LOCAL, we might as well just use ASCIILiteral then since the strlen only happens once per string.
Benjamin Poulain
Comment 5
2012-08-28 18:52:55 PDT
Comment on
attachment 161112
[details]
Patch Great! Looking at the implementation of lookAhead(), I think it would be possible to make a version that does not need static or allocations. I don't know if it is worth it or not, it depends on how hot this path is.
> Source/WebCore/ChangeLog:9 > + Using ASCIILiteral avoids memcpying the string into the heap and > + therefore uses less total memory.
It does not always saves memory (due to the way the allocator works) but it is also always faster ;)
WebKit Review Bot
Comment 6
2012-09-07 11:32:33 PDT
Comment on
attachment 161112
[details]
Patch Clearing flags on attachment: 161112 Committed
r127899
: <
http://trac.webkit.org/changeset/127899
>
WebKit Review Bot
Comment 7
2012-09-07 11:32:37 PDT
All reviewed patches have been landed. Closing bug.
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