• 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: Dead Reckoning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dead Reckoning


  • Subject: Re: Dead Reckoning
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 09 Oct 2015 21:54:36 -0700

> On Oct 9, 2015, at 9:24 PM, Graham Cox <email@hidden> wrote:
>
> Does it actually replace a function call with an inline constant multiply?

Sure. With optimizations enabled, the compiler is likely to inline the function calls, which will turn them into a simple multiplication. (This applies to any of C, Obj-C, C++, or Swift.) In C-based languages you can use the “inline” keyword to further encourage the compiler.

There’s very little reason to use macros for things like this, when an inline function is as efficient and safer.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: Dead Reckoning
      • From: Graham Cox <email@hidden>
    • Re: Dead Reckoning
      • From: Marco S Hyman <email@hidden>
References: 
 >Dead Reckoning (From: Michael de Haan  <email@hidden>)
 >Re: Dead Reckoning (From: Michael de Haan  <email@hidden>)
 >Re: Dead Reckoning (From: Graham Cox <email@hidden>)
 >Re: Dead Reckoning (From: Rick Mann <email@hidden>)
 >Re: Dead Reckoning (From: Graham Cox <email@hidden>)

  • Prev by Date: NSTokenField in NSTableView??
  • Next by Date: Re: Dead Reckoning
  • Previous by thread: Re: Dead Reckoning
  • Next by thread: Re: Dead Reckoning
  • Index(es):
    • Date
    • Thread