Maybe the nice thing about templates/preprocessor is that the work is done once at compilation time, and not each times the software is started.
Also, preprocessor help you to initialise a lot of things which will then be loaded in memory already initialised, ready to use.
It is not unheard-of to generate a lot of variable/structure and sort them by the "sort" command in Makefile to have a sorted list ready to use, with pointer to next already set by the linker. That initialised memory will also have good cache locality.
Some people may also have tried to use the old "m4" macro language to replace the CPP processor, but it did not stick too nicely.