[webkit-dev] some WebCore::String plans

Darin Adler darin at apple.com
Tue Dec 18 11:01:47 PST 2007

On Dec 18, 2007, at 10:56 AM, Geoffrey Garen wrote:

> Would you suggest the same kinds of changes to KJS::UString?

Probably not.

I think the issues with KJS::UString are different. Long term it would  
be nice to consider exactly what the differences are between two  
classes and how to reconcile them.

The biggest difference is that while WebCore::String has no allowance  
for efficiently growing the string, which keeps it small (StringImpl  
is 12 bytes plus the character buffer), KJS::UString has optimizations  
for both growing the string and for substring sharing  
(KJS::UString::Rep is much larger than 12 bytes).

One helpful step for reconciling the classes could be moving the  
WebCore::String family into WTF.

     -- Darin

More information about the webkit-dev mailing list