12 Feb
2010
12 Feb
'10
10:10 p.m.
Hello, Say I define a macro #define MYMACRO(x,y) .. MYMACRO because of various reasons takes very long to expand (1mn) (uses PP_FOR, PP_WHILE, PP_SEQ_FOR_EACH .). If later in the translation unit, I have a "call" to MYMACRO MYMACRO(a,b) and then a couple of lines later MYMACRO(a,b) Will it be faster to define line 15: #define MYMACRO_ab MYMACRO(a,b) and then use line 25: MYMACRO_ab . line 35: MYMACRO_ab When does MYMACRO expansion happen? Is it at line 15 once, or at lines 25 and 35? Is the answer compiler-dependent? Regards,