Is Template Metaprogramming faster than the equivalent C code?

前端 未结 8 2361
旧时难觅i
旧时难觅i 2021-01-02 02:07

Is Template Metaprogramming faster than the equivalent C code ? ( I\'m talking about the runtime performance) :)

8条回答
  •  醉梦人生
    2021-01-02 02:20

    Template metaprogramming does not give you any magical powers in terms of performance. It's basically a very sophisticated preprocessor; you can always write the equivalent in C or C++, it just might take you a very long time.

提交回复
热议问题