Go to the FreeLists Home Page Home Signup Help Login
 



Browse interfacekit: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

[interfacekit] Re: BString patch suggestion and some questions,too

  • From: Oliver Tappe <openbeos@xxxxxxxxxxxxxxx>
  • To: interfacekit <interfacekit@xxxxxxxxxxxxx>
  • Date: Thu, 30 Oct 2003 22:04:33 +0100
On 2003-10-30 at 16:52:52 [+0100], burton666@xxxxxxxxx wrote:
> > Hi everyone,
> Hi Oliver !
> 
> > I am using a fork of the OBOS-BString class for Beam and I have found 
> > some peculiarities with the given implementation:
> 
> Hmmm.... I haven't looked at that code for so much time... let me get 
> back on track.... ok...
> 
> BTW... Why a fork ? :PPPP

Good question, actually! Can't really remember anymore >:o) I think it had 
to do with the fact that I wanted to change some behaviour (as opposed to 
how R5-BString works).

[ 8< snip 8< ]

> > 3) MoveInto() in R5 works in a very peculiar way if it is asked to move 
> > more
> >    characters than it contains: it just copies as many characters as 
> >    requested (so it may segfault) but doesn't change the original 
> >    string at all!
> 
> Are we following that behaviour currently ?
> Yes, I know I wrote that code, I just can't remember :))

Believe me >;o) OBOS and R5 behave like that.

> 
> >    Shouldn't we break compatibility with R5 and just move as many 
> >    characters as possible (without risking a crash, too)? 
> >    I can't imagine any app is relying on this bug (surely not?), so I 
> >    say let's change the current
> > 
> [cut]
>  
> > Any comments/corrections are appreciated!
> 
> I'm all for it. If you provide a patch, I will be more than happy to 
> apply it (if no one is faster, obviously).

Ok, I will try to come up with something reasonable.

> P.S: I'm happy you're having a look at that code, since that way we can 
> make the implementation better, and that's what opensource is about, 
> isn't it ? BTW, what about performance? I did some tests back then, and 
> we were sometimes much faster, sometimes a bit slower than the R5 
> implementation... since you are actually using our BString implementation 
> (and that's VERY good), I would like to know your experiences...

I think OBOS-BString performs quite well know, as opposed to R5-BString, 
which is pathetic if for instance you do a replace in a large string. 
I am sure that BString could be optimised more, but I go with Eric about 
early optimisation...

cheers,
        Oliver

Other related posts:

  • [interfacekit] Re: BString patch suggestion and some questions,too
  • [interfacekit] Re: BString patch suggestion and some questions,too
  • [interfacekit] Re: BString patch suggestion and some questions,too
  • [interfacekit] Re: BString patch suggestion and some questions,too
  • [interfacekit] Re: BString patch suggestion and some questions,too




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.