Re: Should I do loops in reverse order ?
Re: Should I do loops in reverse order ?
- Subject: Re: Should I do loops in reverse order ?
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 28 Nov 2006 00:48:03 -0800
And while we are second guessing the compiler, let us not forget
manual loop unrolling. Just be careful to use the various
performance analysis tools to determine the optimal number of
"unrolled iterations". And you'll want to use a bunch of #ifdefs to
ensure that you are per-architecture optimal, too....
id o;
o = [myArray objectAtIndex: 0];
... do something ...
o = [myArray objectAtIndex: 1];
... do something ...
o = [myArray objectAtIndex: 2];
... do something ...
o = [myArray objectAtIndex: 3];
... do something ...
o = [myArray objectAtIndex: 4];
... do something ...
o = [myArray objectAtIndex: 5];
... do something ...
if ([myArray count] > 6) {
for(i=6;..) {
... do something ...
}
}
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden