Template speedup