Re: Java vs C/Objective-C performance question
Re: Java vs C/Objective-C performance question
- Subject: Re: Java vs C/Objective-C performance question
- From: Chris Ridd <email@hidden>
- Date: Mon, 17 Mar 2003 15:20:16 +0000
On 17/3/03 11:43 am, Dietrich Epp <email@hidden> wrote:
>
On Monday, March 17, 2003, at 01:23 AM, Chris Ridd wrote:
>
>
> On 17/3/03 9:01 am, Dietmar Planitzer <email@hidden> wrote:
>
>> 1) Always compile ObjC code with all optimizations turned on. By
>
>> default PB compiles the code with all optimizations turned off which
>
>> means that gcc will produce horribly bad code.
>
>
>
> It is peculiar that gcc doesn't seem to optimize away that first set of
>
> nested loops, even using -O3.
>
>
>
> Perhaps gcc always produces horribly bad code :-)
>
>
<sarcasm>Right... which is why it always does so horribly on
>
performance tests...</sarcasm>
Actually I've no idea if gcc on PPC produces excellent code or not, so your
sarcasm is lost on me :-) Do you have any good references to up-to-date PPC
compiler comparisons?
>
Seriously though, you just got to know GCC command options. -O3 is
>
nothing more than bland, generic optimization.
>
>
I tested it out with -funroll-loops. Funny, these results. It unrolls
>
the inner loop 20 times, then reduces the 20 +1s to a single +20, but
>
doesn't unroll it any farther. -frerun-loop-opt doesn't do anything,
>
maybe it doesn't apply to loop unrolling (which makes sense).
I was expecting (without reading the documentation :-) that -O3 would unroll
loops, but obviously it doesn't.
Is the loop-unrolling behaviour you're seeing processor-independent?
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.