r/C_Programming • u/wiseneddustmite • May 31 '26
question about inline
i read that inline tells the compiler to write the code of the function directly where the function is called in the code instead of calling the function that was declared separately and this saves a bit of performance, but when should/shouldn't inline be used
9
Upvotes
View all comments
Show parent comment
1
u/a4qbfb Jun 03 '26
Not true. Inlining a short function can easily end up generating less code than calling it.