4 ms·
Macros are better because of performance? That's premature optimization if I ever saw it. OS-specific configuration / function definition is not going to be the
by devinj 16y ago
Macros are better because of performance? That's premature optimization if I ever saw it. OS-specific configuration / function definition is not going to be the performance bottleneck on pretty much any app I've seen. Maybe if you're writing a CGI program where it's run many times and has to do this setup each time, but then CGI is dead for a reason. Macros have plenty of problems that result in weird edge-case behavior, and I'd really rather not have them.
Oh, and finally, they aren't unique to C. You can use the macro preprocessor on any source code you like.