void run_hot(void) { // I am called very often! serve(); // <more code here> } void run_cold(void) { // I am called only occasionally! serve(); // <more code here> } ???inline??? void serve(void) { // I only want to be called inline from hot functions! // <more code here> }
Is there a way to explicitly embed function A into function B without explicitly inserting the same function A into function C? Or am I completely at the mercy of my compiler?
You are completely at the mercy of the inlaid compiler.Leave aside partially, regardless of whether the inline function is the only solution that the compiler makes best, and you must rely on it to make the best decision.
inline
Source: https://habr.com/ru/post/914186/More articles:Solidification of the molten data frame? - rUsing Web API Authentication - asp.net-web-apiSQL Server: average hours by hours and days of the week - sqlA neat way to apply a function to every nth element of a sequence? - functional-programmingIs it possible to execute javascript based on window size? - javascriptjava.lang.ClassFormatError: Incompatible magic value 218774561 - javaHow to serve .dmg file via PHP / readfile? - phpMVC Custom Authorize Attribute to Test Request - asp.net-mvcDoes WCF call a function without waiting for its completion? - multithreadingIntelliJ debugging: pause the whole virtual machine, and then step by step - javaAll Articles