Re: proposed change to UT_String


Subject: Re: proposed change to UT_String
From: Mike Nordell (tamlin@algonet.se)
Date: Sat Apr 14 2001 - 18:02:19 CDT


Joaquín wrote:
> Mike Nordell wrote:
> > What might do the trick would be:
> > m_pEnd = m_psz;
>
> of course. Need sleep, sorry.

And I've got a flu from .dk. Who's next, anyone got pneumonia? :-)

> > Are there any performance figures (or at least a reasurring "I've tested
it,
> > it hurts performance") telling us this is the right thing to do?
>
> nope, I was just thinking about the most current implementation of stl
> vector, and asking for something like that for UT_String. I don't
> really think that it would impact very much our speed.

Then I think we should leave it. The only thing this patch would do is
affect speed (even if indirect by memory fragmentation), and since this
isn't even on the top-100 of our speed problems...

Besides, this class isn't (currently) intended to be reallocated that often.
I initially wrote it to replace all those
    char foo[400];
and such buffers. It then just happened to fit a few other places, and then
it just took on a life of it own...

> if these are the same tests that I saw last time, we will not see any
> gain at all with this change.

I was more thinking of using them to verify the implementation, not the
speed. If your proposed change had indeed been committed, we would have
needed those tests! :-)

> To see the gain we should have a string,
> fill it with something, clear it, refill it with something else, reclear
> it, and so on.
>
> I think that in this scenario it will actually make a difference.

It would, but how does that compare to the memory footprint and current
usage patterns in AW? I think it's currently premature optimization, but if
proven wrong I'm all for it.

/Mike



This archive was generated by hypermail 2b25 : Sat Apr 14 2001 - 18:02:30 CDT