Wouldn't measuring the time elapsed (in template tester) provide some kind of rough measure, by which you can compare different templates? e.g.
Code:
program:
start = format_date(today(), 'to_number');
strcat('a');
format_date(today(), 'to_number') - start
Edit: A custom function called (time_it) can do the same
Code:
def evaluate(self, formatter, kwargs, mi, locals, template):
from calibre.utils.date import now
start = now()
template_output = formatter.__class__().safe_format(template, mi, 'TEMPLATE_ERROR', mi)
diff = now() - start
return diff.total_seconds()
Code:
program: time_it("program: strcat('a')")