Should I use macros to inline code?
adam at visix.com
adam at visix.com
Wed Mar 27 12:46:02 AEST 1991
Hi, a quick question --
Given today's C compilers, is there any reason at all to explicitly
inline code with macros?
The only thing I could think of was there might be cases where you
want explicit control of the space/time tradeoff (but surely the
benefit is small).
Assuming that's useful, is there any use for subroutines, so that a
routine is only inlined once per function? (I.e. would this be a
useful third choice on the space/time tradeoff?) (surely this
benefit is even smaller).
(Actually, I don't see any way to pass arguments to and return from
subroutines that would make them useful in C.)
Thanks much,
Adam
adam at visix.com
More information about the Comp.lang.c
mailing list