[webkit-reviews] review granted: [Bug 22874] Convert HTTPHeaderMap to use AtomicString as its key : [Attachment 26041] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 15 23:12:40 PST 2008

Geoffrey Garen <ggaren at apple.com> has granted Stephanie Lewis
<slewis at apple.com>'s request for review:
Bug 22874: Convert HTTPHeaderMap to use AtomicString as its key

Attachment 26041: patch

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
> +	   static bool equal(const AtomicString& a, const AtomicString& b)
> +	   {
> +	       return equal(a.impl(), b.impl());
> +	   }

I think you could make this more efficient like so:

return a == b || equal(a.impl(), b.impl());

That way, comparing two atomic strings that are indeed equal will just be a
pointer comparison, and you only have to do a character-by-character comparison
if the two strings are not equal, or are equal using different cases.


More information about the webkit-reviews mailing list