Re: loop efficiency & messages
Re: loop efficiency & messages
- Subject: Re: loop efficiency & messages
- From: Pandaa <email@hidden>
- Date: Wed, 23 Mar 2005 07:35:52 +0100
2005-03-22 kl. 23.17 skrev Ondra Cada:
On 22.3.2005, at 23:04, Hamish Allan wrote:
It seems to me that there's a really easy way to signal to the
compiler to cache the result of the getCount in a register:
Absolutely. And, if that is indeed your intention...
int count = [self getCount];
for (i = 0; i < count; ++i)
... you can even declare it "register int count", to reveal it to
other programmers who may read the code. And who knows, the compiler
might perhaps take it into account, too :))
Use the register keyword only as a comment for other programmers. On
modern compilers it usually has no effect on register allocation at all
and the keyword is most likely simply ignored.
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . .
. email@hidden . . www.synapticpulse.net .
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden