On Tue, Mar 12, 2002 at 11:31:37AM +0100, Lars Gullik Bjønnes wrote: > | Ok, maybe I did not make the point clear enough. cstring should only be > | used when data is static, so copy is O(1) since it has to copy the pointer, > | not the data. > > You then have a string that can be used for almost nothing.
It can be used for 'switch'-like if (s == "foo") ... else if (s == "bar") or the math hash stuff (which keeps the name of all known symbols) or in things like math_decorationinset which uses only a static constant strings as names... > | Oh yes. And you buy everybody one of these 2GHz machines just to compile > | and run LyX. > > So this is what you are playing at. (as if I didn't guess...) > And you are not talking of running lyx, don't even pretend you are... If I said 'compile and run' I probably meant it. cstring "allocation" is a no-op. std::string allocation is fairly expensive. This has run-time implications. Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]