[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Header organization of -base & -gui
From: |
Lars Sonchocky-Helldorf |
Subject: |
Re: [RFC] Header organization of -base & -gui |
Date: |
Thu, 3 Jul 2003 19:35:07 +0200 |
On 03.07.2003 18:54:16 Nicola Pero wrote:
>> - NeXT/Apple runtime is known/believed to perform better than GNU
>> runtime.
>
>Hmmm. Do you have benchmarks ? I'd be interested in them if you have.
>
>I thought this was a confused matter open to discussion, with pros and
>cons on each side.
>
>But the Apple runtime performs better on class method invocations -
that's
>a fact (I hoped to have the time to fill the gap at some point, but I
>never found that time <wishful sigh>).
The Apple Runtime uses a cache for Classes and Methods. The name of the
function in objc4 is
_class_lookupMethodAndLoadCache ()
which gets called by
objc_msgSend ()
This cache I believe is also the main reason why GNUstep-base doesn't work
with the Apple runtime:
If a class or method is currently not in cache,
_class_lookupMethodAndLoadCache () calls class_initialize () which
subsequently invokes +[NSObject initialize]. If then in turn there is any
objc message in +[NSObject initialize] this will result in a call to
objc_msgSend () and _class_lookupMethodAndLoadCache () again. But because
the class is not loaded yet this ends up in a loop with no good end ;-).
An example stacktrace of this behaviour is at the end of:
http://groups.google.com/groups?selm=DD750B82-9918-11D6-B3A3-0030654C2998%40hamburg.de&output=gplain
>The GNU runtime has typed
>selectors though, and it's more portable.
Apple's runtime uses assembler and therefore is only working on PPC and
x86.
>
>
>
greetings, Lars
- Re: [RFC] Header organization of -base & -gui, (continued)
- Re: [RFC] Header organization of -base & -gui, David Ayers, 2003/07/30
- Re: [RFC] Header organization of -base & -gui, Adam Fedor, 2003/07/08
- Re: [RFC] Header organization of -base & -gui, Alexander Malmberg, 2003/07/09
- Re: [RFC] Header organization of -base & -gui, Markus Hitter, 2003/07/03
- Re: [RFC] Header organization of -base & -gui, Nicola Pero, 2003/07/03
- Re: [RFC] Header organization of -base & -gui, David Ayers, 2003/07/03
- Re: [RFC] Header organization of -base & -gui, David Ayers, 2003/07/01
Re: [RFC] Header organization of -base & -gui, David Ayers, 2003/07/01
Re: [RFC] Header organization of -base & -gui, Markus Hitter, 2003/07/01
Re: [RFC] Header organization of -base & -gui,
Lars Sonchocky-Helldorf <=
Re: [RFC] Header organization of -base & -gui, Lars Sonchocky-Helldorf, 2003/07/03