Just run this code and then tell me macros are better:
1 2 3 4 5 6 7 8 9 10
#include <iostream>
#define MAXIMUM( a, b ) a > b ? a : b
int main() {
int a = 4;
int b = 6;
int c = MAXIMUM( a++, b );
std::cout << a << ", " << b << ", " << c << std::endl;
}
An inline function is exactly as fast as a macro.
EDIT: removed extra semicolon at end of macro definition as pointed out by PanGalactic