• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: loop efficiency & messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >loop efficiency & messages (From: Mark Dawson <email@hidden>)
 >Re: loop efficiency & messages (From: Ondra Cada <email@hidden>)
 >Re: loop efficiency & messages (From: "Corey O'Connor" <email@hidden>)
 >Re: loop efficiency & messages (From: Ondra Cada <email@hidden>)
 >Re: loop efficiency & messages (From: John Stiles <email@hidden>)
 >Re: loop efficiency & messages (From: Ricky Sharp <email@hidden>)
 >Re: loop efficiency & messages (From: Ondra Cada <email@hidden>)

  • Prev by Date: Dock Application Click
  • Next by Date: Re: loop efficiency & messages
  • Previous by thread: Re: loop efficiency & messages
  • Next by thread: Re: loop efficiency & messages
  • Index(es):
    • Date
    • Thread