Why not make all functions inline?

Jun 4, 2013 at 5:44pm
....... if a function calls make the statements of the program jump and that jump makes the program slower compare to straight execution of statements from top to bottom. Just wondering :D
Jun 4, 2013 at 5:54pm
Sometimes the compiler makes some functions inline even if you did not explicitly specify function specifier inline.:)
Jun 4, 2013 at 7:39pm
What if the function were thousands of lines and called from hundreds of places?

Would you want the code insertion done every place it was called? That would result in massive program bloat; all to save one jump instruction which is infinitesimal compared to the code inserted.

What if the inserted function also had hundreds of function calls? Would you want those expanded inline also?
Last edited on Jun 4, 2013 at 7:40pm
Jun 5, 2013 at 4:42pm
Thanks :D
Topic archived. No new replies allowed.