We discussed the optimizing techniques using lazy evaluation in the previous chapter, and used the delaying process, caching technique, and memoization to make our code run fast. In this chapter, we will optimize the code using metaprogramming, where we will create a code that will create more code. The topics we will discuss in this chapter are as follows:
- Introduction to metaprogramming
- The part that builds the template metaprogramming
- Refactoring flow control into template metaprogramming
- Running the code in the compile-time execution
- The advantages and disadvantages of template metaprogramming