0

I have a 2500 line and 76.8 kb c++ console program. I learned inline function but heard about inline function makes a trouble in huge programs. Is it true? This program is huge or not. It can be a trouble in the future. What should i do or what is your suggestion for me.

Note:Program include lots of functions. Thanks!

mau
  • 39
  • 1
  • 6
  • 2
    Don't worry about optimization until you run into issues; it's the root of all evil: http://c2.com/cgi/wiki?PrematureOptimization – dcaswell Aug 30 '13 at 20:10
  • 3
    A 2500 line program is not huge. By some estimates, Microsoft Office is made of over 30 million lines of code. – Carl Norum Aug 30 '13 at 20:12
  • 2
    possible duplicate of [When should I write the keyword 'inline' for a function/method?](http://stackoverflow.com/questions/1759300/when-should-i-write-the-keyword-inline-for-a-function-method) – In silico Aug 30 '13 at 20:12
  • @user814064: you should have posted this as answer – Alex Shesterov Aug 30 '13 at 20:12
  • 2
    Don't trust any mass generalizations unless there are believable facts to back them up. (Note: please exclude this mass generalization from the rule just stated.) – Scott Mermelstein Aug 30 '13 at 20:13
  • 2
    "*This program is huge or not?*" => No, 2500 lines is an **extremely small** program. As long as *one* person can handle it, it's nowhere big (let alone huge)... I for one am responsible, alone, for about 3 million lines of C++ (not counting helper scripts etc) and I'm not even close to my limit. Now multiply that by a few team-mates... – syam Aug 30 '13 at 20:36
  • Now, aside from the huge/small program issue, I'd be curious to hear **how** `inline` functions "make trouble" in big programs. Care to explain? – syam Aug 30 '13 at 20:45

1 Answers1

3

Is it true?

You can check out the advantage and disadvantages of Inline Functions and justify it

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331