On Mon, 29 May 2006 21:32:20 +0700
Mikhail Gusarov <dottedmag_AT_dottedmag.net> wrote:
>
> DG> Also, operations on a UTF-8 char* are quite unperformant, so we
> DG> would pay in performance for that, most of the time.
>
> Could you say what operations you are need to perform inside window
> manager? I can't imagine now anything harder than replacing end of
> string with '...' or concatenation.
>
> You should do analysis first: what kind of operations your program
> have to perform, and design your data structures then, not vice versa,
> because you might be trying to optimize in wrong place (yes, we all,
> as a software engineers, are pretty good known as being unable to
> predict bottlenecks and performance characteristics of software).
The problem is, that those functions are then not only used in the
window manager, but also by other programs written with the toolkit.
But in the end, you probably are right. Most of the time it might be
completely unnecessary to have a special text structure.
The real ugliness lies in having two sets of functions. That, or I'm
missing something obvious. Like for example paying the costs of
converting the gapped array into a char* are bearable from time to time.
Greetings,
Denis
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:07:17 UTC