2014conference-paper/moving-computations-from-run-time-to-compile-time-hyper-metaprogramming-in-practice

Moving computations from run-time to compile-time: hyper-metaprogramming in practice

Computer programs often contain computations that can be executed at compile-time. The possibility arises when these operations do not depend on runtime information. When it comes to isolating and executing code at compile-time, static metaprogramming is the method of choice. However, it often suffers in terms of convenience, applicability, or performance. We explore the feasibility of applying hyper-metaprogramming -- an extension of traditional metaprogramming -- to alleviate such issues. We show that a language that supports hyper-metaprogramming enables the movement of computations from run-time to compile-time for arbitrarily complex applications. The paper features two case studies -- minimal perfect hashing and regular expressions -- that exemplify and discuss the implications of our approach. The experimental results show that our method produces significant speedups without compromising convenience.

Related projects

No projects linked.

Attachments

No attachments yet.