• 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: Speeding up XCode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speeding up XCode?


  • Subject: Re: Speeding up XCode?
  • From: Steve Checkoway <email@hidden>
  • Date: Wed, 19 Oct 2005 05:09:36 -0700


On Oct 18, 2005, at 2:57 PM, Robert Dell wrote:


let's take this one step at a time.
1) code that doesn't branch takes less time than code that branches
2) calling functions invoke branches in the code
3) my code doesn't call other routines (other than built-in math and locating the position of a certain index in an unknown location)

Unless, of course, your branchless code is so long that it doesn't fit into cache or it knocks something else important out of cache. Then again, with all of the indirect loads through arrays and structs, it's just as likely that your data is missing in the cache so those 17 instructions could take possibly hundreds of cycles depending how far back in the cache you missed.


With deep, super-scalar, out-of-order pipelines, it's pretty difficult to tell just what the performance of any given sequence of machine instructions will actually be _before_ you consider the memory hierarchy. This is not like the MIPS R2000 where you can guess more or less what happens as each instruction travels down the classic 5 stage pipeline.

With simple functions to make the code easier to read and maintain, you say that this will decrease performance. It might, that's true. Or the compiler might notice that you are calling a leaf procedure and decide to inline everything.

I could continue but there are enough ifs and mights and the like in this already. All I'm getting at with this is, you just never know what is going to happen (especially if your code is run on multiple generations of hardware).

- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Speeding up XCode? (From: Mark Wagner <email@hidden>)
 >Re: Speeding up XCode? (From: Robert Dell <email@hidden>)
 >Re: Speeding up XCode? (From: Cameron Hayne <email@hidden>)
 >Re: Speeding up XCode? (From: Andreas Mayer <email@hidden>)
 >Re: Speeding up XCode? (From: Robert Dell <email@hidden>)
 >Re: Speeding up XCode? (From: Cameron Hayne <email@hidden>)
 >Re: Speeding up XCode? (From: shin kurokawa <email@hidden>)
 >Re: Speeding up XCode? (From: Robert Dell <email@hidden>)

  • Prev by Date: Re: Xcode project file format
  • Next by Date: RE: Xcode project file format
  • Previous by thread: Re: Speeding up XCode?
  • Next by thread: Re: Speeding up XCode?
  • Index(es):
    • Date
    • Thread