On Mon, May 29, 2006 at 05:35:30PM +0200, Denis Grelich wrote:
> 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.
I really see no problem. What is the problem in a char *data
array which contains the whole data, and your gapped array which
contains several pointers to this data array? Or if that seems
not adequate, what's the problem in dynamically create a normal
char *data array on request?
Regards,
-- Anselm R. Garbe ><>< www.ebrag.de ><>< GPG key: 0D73F361Received on Mon May 29 2006 - 18:14:06 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:07:17 UTC