Jump to content

inline functions C++


JohnOne
 Share

Recommended Posts

I think I get the idea of why you might use an inline function.

From what I read, if you are calling a function many times throughout your

code, it may be beneficial to have that function inline.

My question is, will making a function inline, benefit my code if it is only used once

but many times in a tight loop?

I also read that long complex functions are not good candidates for inline, but I'm unsure

if that was opinion or factt.

Anyway, the function is neither long nor complicated, but called in something similar to a msg loop.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I liked the idea, it can be much easier than inline assembly!

But I think the trend is to have a real AutoIt compiler, where at least the script is converted into C and after that, compiled!

I bet all the chips in AutoIt, no doubt!


João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

It can benefit yes. The compiler may already inline the code or may not even if you tell it to. The inline keyword is a hint that the compiler may not need or may ignore entirely.

Thank you.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...