The Impossible Optimization, and the Metaprogramming To Achieve It

27 points by duck_tape


osa1

TLDR: Specializing a regexp interpreter based on constant regexp strings gives you efficient regexp functions.

zupa

This is an area of active research I believe, called staging compilation.