Do more pattern preparation at compile-time