Bug 241252
| Summary: | Optimize HTMLTokenizer::bufferASCIICharacter() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
| Component: | WebCore Misc. | Assignee: | Chris Dumez <cdumez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Chris Dumez
Optimize HTMLTokenizer::bufferASCIICharacter() by appending several characters at once whenever possible.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/1265
EWS
Committed r295171 (251255@main): <https://commits.webkit.org/251255@main>
Reviewed commits have been landed. Closing PR #1265 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/94330783>
Alexey Proskuryakov
Is this actually an optimization? Seems like loop un-unrolling, this has to be slower than before?
Chris Dumez
(In reply to Alexey Proskuryakov from comment #4)
> Is this actually an optimization? Seems like loop un-unrolling, this has to
> be slower than before?
I started A/B testing to confirm. In this case, the length of the literal is known at build time and the function is inlined so I wouldn't expect this to regress. However, I believe that appending all the characters at once to the Vector is beneficial so that it can make appropriate decisions internally about resizing its buffer.
We'll see.