[BioCocoa-dev] Peptides...

Koen van der Drift kvddrift at earthlink.net
Fri Mar 25 07:18:38 EST 2005


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.


cheers,

- Koen.



On Mar 24, 2005, at 10:11 PM, Koen van der Drift wrote:

> Without using Shark, just the counter in Peptides, the symbolcounter 
> code is about 2 times faster than the other one...
>
> - Koen.
>
>
>
> On Mar 19, 2005, at 6:34 PM, Alexander Griekspoor wrote:
>
>> I'll test it and see what's the fasted method...
>> Alex
>>
>> On 20-mrt-05, at 0:32, Koen van der Drift wrote:
>>
>>>
>>> On Mar 19, 2005, at 5:48 PM, Alexander Griekspoor wrote:
>>>
>>>> Shark tells me that most time (65%) is already lost to object 
>>>> messaging in the symbol counter, so perhaps that could deserve some 
>>>> optimization ;-)
>>>
>>>
>>> Try setting the #if 0 in calculateMassForRange. Then it won't use 
>>> the symbolCounter, but calculate each individual symbol. Maybe 
>>> that's faster.
>>>
>>> - Koen.
>>>
>>> _______________________________________________
>>> Biococoa-dev mailing list
>>> Biococoa-dev at bioinformatics.org
>>> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>>>
>>>
>> *********************************************************
>>                       ** Alexander Griekspoor **
>> *********************************************************
>>                 The Netherlands Cancer Institute
>>                 Department of Tumorbiology (H4)
>>           Plesmanlaan 121, 1066 CX, Amsterdam
>>                     Tel:  + 31 20 - 512 2023
>>                     Fax:  + 31 20 - 512 2029
>>                    AIM: mekentosj at mac.com
>>                     E-mail: a.griekspoor at nki.nl
>>                 Web: http://www.mekentosj.com
>>
>>           LabAssistant - Get your life organized!
>>           http://www.mekentosj.com/labassistant
>>
>> *********************************************************
>>
>> _______________________________________________
>> Biococoa-dev mailing list
>> Biococoa-dev at bioinformatics.org
>> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>>
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>




More information about the Biococoa-dev mailing list