Re: Inline C functions in Xcode 3
Re: Inline C functions in Xcode 3
- Subject: Re: Inline C functions in Xcode 3
- From: Jonas Maebe <email@hidden>
- Date: Sun, 4 Nov 2007 10:24:16 +0100
On 04 Nov 2007, at 03:57, Vincent Coetzee wrote:
The ordering of the tests and storage of the "classes" (although in
the case of Self there are no classes only prototypes and sort of
code level mixins called traits, and these are way more complicated
than Objective-C's relatively linear class hierarchies) are
constantly modified according to the relative incidence of
invocations that pertain to that "class".
Self usually runs in a virtual machine (interpreted or with a just-in-
time compiler), while Objective-C is usually statically compiled to
native code. You need quite a bit of infrastructure to be able to
dynamically modify a program's code, which in turn may kill the
performance you might gain by the ability to do so.
Dynamic optimization is really hard. Only recently people started
doing it successfully in some very specific cases which were
traditionally handled by static compilation (such as 3D pipelines,
like Apple's use of llvm in OpenGL, and TransGaming's use of
SwiftShader in their DirectX emulation), and some benchmarks can also
be optimized better in dynamic environments like a Java or MSIL VM.
But in general, static compilation still wins usually.
While I do think that some time in the future a combination of static
and dynamic compilation/optimization will virtually always outperform
purely statically compiled code, we're not yet there. Running all of
Cocoa/Objective-C in a VM-style environment would at this point
probably mostly cause more memory usage and lower performance,
regardless of how smartly you inline, de-virtualize calls etc. It may
also make integration with plain C/C++ code quite a bit more hairy.
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden