[Webkit-unassigned] [Bug 236532] New: look up InputTypeFactoryMap with an ASCII lowercase string instead of using a ASCIICaseInsensitiveHash
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 11 15:47:40 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=236532
Bug ID: 236532
Summary: look up InputTypeFactoryMap with an ASCII lowercase
string instead of using a ASCIICaseInsensitiveHash
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: heycam at apple.com
InputType::create looks up the InputTypeFactoryMap based on the AtomString value of the <input type> attribute. The HashMap uses an ASCIICaseInsensitiveHash, but the AtomStrings stored in the map are all ASCII lowercase to begin with. This means that we spend time doing an ASCII case insensitive hash computation on the query string. Most content already supplies an ASCII lowercase type value, so it's less work to ASCII lowercase the type value and then look up the HashMap using the regular hash for AtomStrings (i.e., pulling the hash out of AtomString).
Doing this is a 0.5% improvement on a couple of Speedometer 2 subtests, and a 0.1% improvement to the overall score.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220211/63f6b502/attachment-0001.htm>
More information about the webkit-unassigned
mailing list