Senin, 06 Februari 2017

How to avoid overhead of the function using inline functions

Making a function inline avoids the overhead of a function call. By default functions defined inside a class are inline. To get the benefits of making a function inline, function defined outside the class can also be made inline. Syntax for defining a function as inline is as follow: 1 2 3 4 inline return–type ClassName :: function–names(params–list) { //Body of function } Consider the following example which demonstrate inline member functions: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

The post How to avoid overhead of the function using inline functions appeared first on Coding Security.


How to avoid overhead of the function using inline functions
read more

Tidak ada komentar:

Posting Komentar