• 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: inline functions always inlined?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inline functions always inlined?


  • Subject: Re: inline functions always inlined?
  • From: Howard Moon <email@hidden>
  • Date: Wed, 24 Feb 2010 14:18:36 -0800


I have heard that when you define a function as inline, it's the compiler's choice whether to actually inline it or create function call based on how much code there is. Is there a way to force it to inline no matter how big the function is?

You're always free to use a macro instead of a function. Macros are simple text replacements, which effectively inlines the code.


I know, I know... macros are "evil"! :-) Still, they work for the little snippets of code that you might normally want to inline, realizing the goal of no function call overhead while avoiding code repetition.

-Howard

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >inline functions always inlined? (From: email@hidden)

  • Prev by Date: Re: Setting thread name for debugger
  • Next by Date: moving files into groups which match the filesystem
  • Previous by thread: Re: inline functions always inlined?
  • Next by thread: moving files into groups which match the filesystem
  • Index(es):
    • Date
    • Thread