• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inline C functions in Xcode 3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Inline C functions in Xcode 3 (From: David Riggle <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Nick Zitzmann <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Michael Nickerson <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Eric Albert <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Steve Checkoway <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Vincent Coetzee <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Chris Hanson <email@hidden>)
 >Re: Inline C functions in Xcode 3 (From: Vincent Coetzee <email@hidden>)

  • Prev by Date: Re: Stupid User (that's me BTW) Can't get xCode -> IB integration to work.
  • Next by Date: Single Stepping Debugger Doesn't Work
  • Previous by thread: Re: Inline C functions in Xcode 3
  • Next by thread: Re: Inline C functions in Xcode 3
  • Index(es):
    • Date
    • Thread