[Webkit-unassigned] [Bug 285160] Improve DOMStringList::contains() from O(n) to O(1)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 25 20:44:59 PST 2024
https://bugs.webkit.org/show_bug.cgi?id=285160
--- Comment #1 from Karl Dubost <karlcow at apple.com> ---
It should be possible to initialize an unordered_string with all the strings and making it private.
if (!m_stringSet) { m_stringSet.emplace(m_strings.begin(), m_strings.end()); }
Then the contains function could return a result with
m_stringSet->find(string) != m_stringSet->end();
--
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/20241226/c99ac55e/attachment.htm>
More information about the webkit-unassigned
mailing list