Describe the differences between a call to an inline function member and a function that is not declared inline.. What advantages are there to inline? What disadvantages?

What will be an ideal response?


When a function is invoked, normally the function’s executable code has been placed to the side. The compiler puts a function call in the caller’s executable. The parameter passing mechanisms are set up so control is sent to the function’s code. There is only
one instance of the called function’s code no matter how many objects there are and no matter how many times the member function is called.
In-line definitions do things differently. The compiler places the body of inline functions in the execution stream at the place of the call with variable set in accord with the parameter calling mechanism.. Inlining is done only for small functions. (In fact, one of my compilers refuses to inline any function with a switch or loop.)
The advantage of inlined functions is that inline functions tend to be faster, at least for small functions. The non-inline overhead of setting up the parameter passing mechanism and transferring control is avoided. The disadvantages of inlined functions are that the code will be larger if the inline function is called many times. The code will be slower for large inline functions than for equivalent non-inlined functions.

Computer Science & Information Technology

You might also like to view...

Use the rules of exponents to combine like bases and simplify the expressions:

![15050|206x170](upload://bHcpWlRH6LTQR0StRP5b9EN4oJP.jpeg)

Computer Science & Information Technology

Audra is a manager in the Sales Department for Creative Pastry Gadgets. She needs access to up-to-date financial data and sales reports. Some of this information comes from Excel workbooks, but other information is stored in other software programs. In addition, Creative Pastry Gadgets maintains a database with detailed financial information and sales figures. Audra uses Excel to analyze data from external data sources. ? Audra needs to delete a connection to a data source. She should select the connection in the list in the Workbook Connections dialog box, and then click the _______ button.

A. Delete B. Remove C. Omit D. Detach

Computer Science & Information Technology

Which of the following terms describes the software layer that is responsible for creating and running a VM on a host?

A. Intel VT B. Virtual machine C. Virtual hard disks D. Physical machine E. Hypervisor

Computer Science & Information Technology

A FragmentManager can use ________ to dynamically add, remove and transition between Fragments.

a. Transactions b. FragmentTransactions c. FragmentTransitions d. Transitions

Computer Science & Information Technology