the fastest javascript templating with inheritance