> On Oct 9, 2015, at 9:24 PM, Graham Cox <graham....@bigpond.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to