Arnulf,

it looks quite similar, thanks for the hint. Do you know if they did some formal analysis of the performance?

Kay


Arnulf Wiedemann wrote:
Hi Kay,
here is what the scripting language Tcl does use for dynamic string handling:

/*
 * The structure defined below is used to hold dynamic strings.  The only
 * field that clients should use is the string field, accessible via the
 * macro DStringValue.
 */
#define DSTRING_STATIC_SIZE 200
typedef struct DString {
    char *string;               /* Points to beginning of string:  either
                                 * staticSpace below or a malloced array. */
    int length;                 /* Number of non-NULL characters in the
                                 * string. */
    int spaceAvl;               /* Total number of bytes available for the
                                 * string and its terminating NULL char. */
    char staticSpace[DSTRING_STATIC_SIZE];
                                /* Space to use in common case where string
                                 * is small. */
} DString;


It is used there for some time and seems to have proven well. I had only a short look at your document, but if I have understood correctly, you plan to do something similar.

+1
Just my 2 cents.
Arnulf

Am Dienstag, 13. September 2005 17:38 schrieb Kay Ramme - Sun Germany - Hamburg:

Hi guys,

as the performance of rtl::OUStrings (the UNO C/C++ String) is coming up
for discussions once a while (because of showing up in profiles e.g.
when loading a large spreadsheet), I wrote a short paper

http://udk.openoffice.org/common/man/concept/string_invest.html

investigating especially into construction&destruction and suggesting a
slightly modified variant, with improved behavior. So, if you have some
time left, I would like to get your feedback ;-).


Thanks in advance

Kay

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to