Re: are static operations optimized?
Re: are static operations optimized?
- Subject: Re: are static operations optimized?
- From: "Eric A. Borisch" <email@hidden>
- Date: Tue, 27 Jan 2009 12:29:25 -0600
By no means XCode specific, but here is a useful reference on which
compilers do what compile-time optimizations:
http://www.agner.org/optimize/optimizing_cpp.pdf (section 7.2)
For my 2c, I've had the most success (in gaining speedups through SSE
intrinsics) in portions of code where the compiler doesn't know of
additional constraints on the problem.
Eric
On Tue, Jan 27, 2009 at 12:24 PM, Michael Crawford <email@hidden> wrote:
>> I share the opinion of most experts when I say: please spend your mental
>> cycles on creating a solid data and code architecture and let the tools do
>> what they do best. Every minute spent worrying about how to optimize an
>> operation would be better spent figuring out an architecture that didn't
>> require the operation in the first place.
>
> People say this to me all the time, but I have never met an optimizer
> I couldn't beat - and significantly so - by writing better code.
>
> Judicious use of a profiler helps, in one case I used the Intel VTune
> Performance Analyzer for a solid month to tune up a C++ database
> kernel.
>
> If you wonder how this can be, consider that there are things that an
> optimizer cannot optimize. If you do something stupid in your code,
> the best an optimizer can do is to accomplish that stupidity in the
> fastest way possible.
>
> The usual example given is to choose a better algorithm, for example a
> binary search instead of a linear search. Of course that's correct -
> but it's not what I'm referring to; I'm referring to tight code.
>
> I have been paid to write code for twenty-one years now, and I have
> used all manner of compilers on all manner of platforms to generate
> code for all manner of processors - and never have I found even a
> single optimizer that I can't beat by tightening up my code.
> Mike
> --
> Michael David Crawford
> mdcrawford at gmail dot com
>
> I'm looking for a job in Silicon Valley:
> http://www.goingware.com/resume/cover-letter.html
> _______________________________________________
> 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
>
--
Eric A. Borisch
email@hidden
_______________________________________________
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