Relative Content

Tag Archive for c++c++11visual-studio-2010visual-c++preprocessor

Why are my preprocessor-macros slower or faster than manual writing seemingly random?

Yesterday at work, my colleague claimed that preprocessor macros were slower than writing variables and functions manually. The context is that we have a class in which member variables are sometimes added and for each of these member variables, 3 different methods have to be created in exactly the same pattern. We had these generated automatically using macros, as shown below.