[Biococoa-dev] BCNucleotideRNA
Alexander Griekspoor
mek at mekentosj.com
Sun Sep 26 14:37:55 EDT 2004
>> Yes, it is. Still, that doesn't exclude that ours is not elegant as
>> well ;-) Seriously, we have discussed this way back and I pointed to
>> the way BioJava does things. Indeed the alphabet stuff is quite nice,
>> but overall I like the way we have done things just as much. In fact
>> the way we use class methods to generate shared instances, instead of
>> factory objects is something more elegant in my opinion.
>
> I agree for the way we create the symbols. But for creating sequences,
> I still think it would be beneficial if we pass a string (or other
> BCSequence) plus the required BCSymbolSet either to BCSequence, or to
> an external class that will return a BCSequence. We don't have to
> replace the current code, this can be just an additional way to do
> things.
Sure we can add this possibility, let see how the BCSymbolSet turns out
and then discuss how to add that exactly...
>>>> Looking up methods in an ObjC superclass is significantly slower
>>>> than having them in the object being used.
>>>
>>> I didn't know that. Is this only for ObjC, or also for other OO
>>> languages, such as C++ and Java?
>>
>> I was curious as well, and did some searching on the web on the
>> Objective-C runtime. I found this snippet:
>>
>> The method is looked up BY NAME, first in the class and then in each
>> superclass in order. Once a successful lookup has occurred (or failed
>> to occur) the associated function pointer (or pointer to the error
>> function) is cached so that future invocations are fast (~ 2-3x a
>> simple function call).
>>
>> So it seems you're right in principle, but given the fact that most
>> methods we're talking about are only one superclass up, and that
>> after the first time, the function pointer is cached, I can hardly
>> imagine that you will see anything of this.
>
> The first lookup is during the init of the symbols, so any further
> manipulations should be fast, if I understand you correctly?
I'm not sure whether the methods are looked up for the first time when
called or when the class is initialized. Anyway, I think it doesn't
matter in either case..
Cheers,
Alex
*********************************************************
** 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
4Peaks - For Peaks, Four Peaks.
2004 Winner of the Apple Design Awards
Best Mac OS X Student Product
http://www.mekentosj.com/4peaks
*********************************************************
*********************************************************
** 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
iRNAi, do you?
http://www.mekentosj.com/irnai
*********************************************************
More information about the Biococoa-dev
mailing list