[interfacekit] Re: BString
- From: Erik Jaesler <erik@xxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Thu, 10 Oct 2002 11:05:29 -0700
One more tidbit: premature optimization is the root of all evil.
Therefore, what you're proposing is the *correct* thing to do until
testing shows a need for further optimization. =)
e
Erik Jaesler wrote:
> Unless you're doing something wacky in String() that really sucks up the
> cycles, I think this is a perfectly valid way to go.
>
> e
>
> Jack Burton wrote:
>
>>Hi all.
>>I hope you all won't be upset by another question :)
>>I'm approaching the completion of BString (some methods are well tested,
>>other aren't, and a pair aren't implemented, but it will be in short time),=
>>
>>and I was wondering.... Often I have some function which are similar, for
>>example:
>>
>>1. Prepend(const char *string)
>>
>>and
>>
>>2. Prepend(const BString &string).
>>
>>These functions call a private utility function (_DoPrepend),
>>but I am thinking if it would be better for the (2) to just call the first
>>(i.e.
>>
>>Prepend(const BString &string)
>>{
>>=09Prepend(string.String());
>>}
>>
>>Yes, this mean a little performance loss, but it would have the undubious
>>vantage that there would be less code =3D=3D less bugs.
>>Anyway, this is just an example, and I would be glad if someone took a
>>moment and threw a look to our BString implementation, to understand what I=
>>
>>am saying.
>>
>>Thanks.
>>
>
>
>
- References:
- [interfacekit] BString
- From: Jack Burton
- [interfacekit] Re: BString
- From: Erik Jaesler
Other related posts:
- » [interfacekit] BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- » [interfacekit] BString
- » [interfacekit] Re: BString
- » [interfacekit] Re: BString
- [interfacekit] BString
- From: Jack Burton
- [interfacekit] Re: BString
- From: Erik Jaesler