optimising OUString for space

Stephan Bergmann sbergman at redhat.com
Mon Oct 1 04:12:20 PDT 2012

On 10/01/2012 01:02 PM, Noel Grandin wrote:
> That was something I was thinking about the other day - given than the
> bulk of our strings are pure 7-bit ASCII, it might be a worthwhile
> optimisation to store a bit that says "this string is 7-bit ASCII", and
> then store the string as a sequence of bytes.

"replace rtl::OUString with a UTF-8 string for better space efficiency, 
and Unicode coverage."

> The latest Java VM does this trick internally - it pretends that String
> is stored with an array of 16-bit values, but actually it stores them as
> UTF-8.

Java's modified UTF-8, presumably.  (Me the nitpicker :)


More information about the LibreOffice mailing list