[BioCocoa-dev] Peptides...

John Timmer jtimmer at bellatlantic.net
Fri Mar 25 08:40:27 EST 2005

Don't worry, I'm changing that code today anyway.  I finally should have
some free time this afternoon, so I'm going to test both NSSet and SymbolSet
instead of the array.

I will definitely keep this info in mind when I make the changes. I guess my
excessive caution had a cost here.  We'll just have to trust people not to
poke around in the memory at the other end of that pointer - thanks for the

Thanks -


> Aha,
> I found the cuplprit of the slowing down.  Right now the accessor for
> symbolArray in BCAbstractSequence returns a copy of the array. So
> everytime a copy has to be created. Changing it to:
> - (NSArray *)symbolArray
> {
> //    return [[symbolArray copy] autorelease];
> return symbolArray;
> }
> gave a huge speed increase (8 -> 1.2 sec on a G4 867 MHz). I suggest we
> just use "return symbolArray". If people want an actual copy, we should
> add a different accessor, or leave it to their responsibility to create
> a copy after getting the pointer from the accessor.  I will look in
> other classes and see what the accessors look like.

This mind intentionally left blank

More information about the Biococoa-dev mailing list