Greetings Neal,
That is a very sensible change, but I have two questions.
First, in the change
- if (s.length() > 0)
- copy(s.Data, s.length(), s.length());
+ if (slen != 0)
+ copy(s.Data, slen, slen);
was there a reason to replace the '>' by '!='? It is defensive
programming not to copy negative-length strings.
Second, do you know why gprof sees the calls to length() at all?
Shouldn't an inline function be optimised out? If so, the
optimisation becomes removing a few pointer dereferences (which
should also be optimised out by a sensible compiler). That said, I
agree that it is tidier not to rely on an optimising compiler.
Cheers,
Lachlan
On Saturday 01 February 2003 12:20, Neal Richter wrote:
> I've posted a patch to String.cc with some simple changes with make
> a huge difference in efficiency.
> Please take a look and tell me if you object to any change.
> I'll commit it next week if no one sees a problem.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev