Convert HTTPHeaderMap to use AtomicString as its key. Most keys are standard so it is a memory win to use Atomic Strings for the keys. After two hours of the Stress Test and > 10,000 resources, only ~150 unique headers had been used.
Created attachment 26041 [details] patch
Created attachment 26042 [details] patch
Comment on attachment 26041 [details] patch > + 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. r=me
I don't understand. Any two atomic strings that are equal will have the same impl pointer. That's what an atomic string *is*. It's never correct to compare the characters in two atomic strings; wasted work!
(In reply to comment #4) > I don't understand. > > Any two atomic strings that are equal will have the same impl pointer. That's > what an atomic string *is*. It's never correct to compare the characters in two > atomic strings; wasted work! > I believe the intent is to do a case-insensitive comparison, which an AtomicString pointer compare will not do.
(In reply to comment #5) > I believe the intent is to do a case-insensitive comparison, which an > AtomicString pointer compare will not do. I see now. This is CaseFoldingHash::equal that we're talking about. Got it.
committed r39338 => http://trac.webkit.org/projects/webkit/changeset/39338.