3 ms·
"Be aware, however, that inlining duplicates the function body at each call site, so heavy use of the ‘inline’ keyword can cause your code to grow out of contro
by vikiomega9 9y ago
"Be aware, however, that inlining duplicates the function body at each call site, so heavy use of the ‘inline’ keyword can cause your code to grow out of control."
I didn't quite understand this part. If the code is being inlined on compilation does it matter? I'm assuming the comment meant the output jar file?
- arwhatever 9y agoI think it just means that a unique binary representation of the inlined code gets created and embedded into the compilation output for each usage of the inlined code, which can then cause the compiled output to expand in size.
- vikiomega9 9y agoThis hardly sounds like a disadvantage considering deployment sizes most setups have in production anyway.