[Webkit-unassigned] [Bug 67081] Basic enhancements to StringBuilder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 16 11:17:06 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=67081





--- Comment #9 from Darin Adler <darin at apple.com>  2011-09-16 11:17:05 PST ---
(In reply to comment #8)
> After comparing the cost, I chose to use AtomicString(toString()) and AtomicString(toStringPreserveCapacity()) in toAtomicString() and toAtomicStringPreserveCapacity() respectively.

That is the wrong choice when the string happens to be something that’s already in the AtomicString table. In that case, we should do no memory allocation. Only if the string is not in the table do we want to do the normal toString work.

> If they don't use toString() and toStringPreserveCapacity(), they still need shrinkToFit()

That’s wrong. We can and should create a code path that finds the existing AtomicString without modifying the StringBuilder at all.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list