Re: Speeding up XCode?
Re: Speeding up XCode?
- Subject: Re: Speeding up XCode?
- From: George Warner <email@hidden>
- Date: Wed, 19 Oct 2005 09:31:16 -0700
- Thread-topic: Speeding up XCode?
On Tue, 18 Oct 2005 22:26:41 -0400, Robert Dell <email@hidden> wrote:
> If you want to understand a computer, build one from scratch. I don't mean
> to buy the components at a computer fair and then a box with power supply
> and then slap them together and call it "i built it myself". build
> computers the way i've built them. buy the components from an IC
> manufacturer, hard code the machine code, program the chips, design the
> board and have a board maker make the board (my skills aren't good enough to
> etch complex board patterns), solder in the parts and then test/run the
> computer you've made.
The scariest part of all this is that your last name is Dell! ;-)
> this leads you to understand the integrated components as well as the
> processor(s) you've decided to use. The PPC G4 processor implements up to 7
> instructions per CPU clock cycle but under my example, i've trimmed it down
> to only 1 per cycle. With the greater bandwidth the larger processors are
> starting to obtain, the more instructions per cycle the processors are going
> to be capable of implementing.
If you really care about this level of detail about the Power PC processors
I recommend reading the "PowerPC Performance Primer" @:
<http://developer.apple.com/technotes/tn/tn2087.html>
[\plug]
(no, I don't get paid a commission on hits. ;-)
> you may also note that I've added a condition to it (if the compiler is
> working properly). The speed of any program compiled by any compiler is
> limited by the accuracy of it's compiler. I'd prefer to compile my code
> based on if it's going to be burned into an IC for firmware so it'll take
> the least amount of space and maximum amount of speed. function headers
> take up a lot of space but sometimes are necessary.
I only have one question here: What does SHARK say? ;-)
If your program isn't spending more than 10% of its time running this
routine then if the absolutely best optimizer making it even a thousand
times faster isn't going to be increasing the speed of your program by more
than 10%. Is the time spent on optimizing your code worth this little of a
performance boost?
"Premature optimization is the root of all evil" - Donald Knuth.
So lets say that your routine is the #1 performance hog and that it's
responsible for more than 10% of your users "wait time". My next question
is... What does SHARK say?
The function calling overhead is usually negligible compared to processor
stalls caused by int <-> float conversions, division, cache misses, etc. I'd
worry a LOT more about those things before I'd even start to think about
function overhead.
Oh, and if you _REALLY_ care about how many cycles each instructions are
I'll refer you back to my previous two (1? ;-) questions...
What does SHARK say? ;-)
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)
_______________________________________________
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