Perl Template Roundup October 2010 Performance vs Variant Report: mini-language,instance_reuse

In each of the charts below, a bigger bar and higher number for performance is better.

In the performance drop-off charts a higher (less negative) percentage is better, that is -75% is better than -95%.

Proportionally speaking, a narrow difference between the biggest and smallest colours of the performance drop-off chart is better than a wide difference, although pay attention to the percentage value next to the bar for an accurate value: it can be hard to judge the proportions by eye.

All values (except drop-off percentages) are rounded to three significant figures for readability.

Related Reports

cache_type
purity
syntax_type

Chart Key

VariantDescription
HMacHTML::Macro (1.29)
SolSolution (0.0004)
TATTTemplate::Alloy (1.013) in Template::Toolkit mode
TATT_PTemplate::Alloy (1.013) in Template::Toolkit mode (compile to perl)
TATT_PSTemplate::Alloy (1.013) in Template::Toolkit mode (compile to perl, using process_simple())
TATT_STemplate::Alloy (1.013) in Template::Toolkit mode (using process_simple())
TSTemplate::Sandbox (1.04_01) without caching
TTTemplate::Toolkit (2.22)
TT_XTemplate::Toolkit (2.22) with Stash::XS (no version number)
TT_XCETTemplate::Toolkit (2.22) with Stash::XS (no version number) and Template::Parser::CET (0.05)
TeCSText::ClearSilver (0.10.5.4)
TeClevText::Clevery (0.0003) in XS mode
TeClevyText::Clevy (0.0002) in XS mode
TeXsText::Xslate (0.2012)
TeXsPPText::Xslate::PP (0.2012)
TeXsTTText::Xslate (0.2012) in Template::Toolkit mode
HMacHTML::Macro (1.29)
SolSolution (0.0004)
TATTTemplate::Alloy (1.013) in Template::Toolkit mode
TATT_PTemplate::Alloy (1.013) in Template::Toolkit mode (compile to perl)
TATT_PSTemplate::Alloy (1.013) in Template::Toolkit mode (compile to perl, using process_simple())
TATT_STemplate::Alloy (1.013) in Template::Toolkit mode (using process_simple())
TSTemplate::Sandbox (1.04_01) without caching
TTTemplate::Toolkit (2.22)
TT_XTemplate::Toolkit (2.22) with Stash::XS (no version number)
TT_XCETTemplate::Toolkit (2.22) with Stash::XS (no version number) and Template::Parser::CET (0.05)
TeCSText::ClearSilver (0.10.5.4)
TeClevText::Clevery (0.0003) in XS mode
TeClevyText::Clevy (0.0002) in XS mode
TeXsText::Xslate (0.2012)
TeXsPPText::Xslate::PP (0.2012)
TeXsTTText::Xslate (0.2012) in Template::Toolkit mode

literal_text

A chunk of literal text, dumped through to the output largely unchanged from its form in the template.

"Largely unchanged" means that where possible any encoding or escaping is turned off, however some engines may not have this option.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

scalar_variable

Interpolation of a template variable.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

hash_variable_value

Interpolation of a value of a hashref template variable.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

array_variable_value

Interpolation of an element of an arrayref template variable.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

deep_data_structure_value

Interpolation of a value stored in a 6-deep hashref structure.

This is designed to stress the speed that the template engine traverses deep data-structures.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

array_loop_value

Loop across a template variable arrayref of scalar elements dumping their values, by any means available.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

hash_loop_value

Loop across a template variable hashref of scalar values dumping both key and value, by any means available.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

records_loop_value

Loop across a template variable arrayref of hashrefs, as per a result-set of records, dumping each record, by any means available.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

array_loop_template

Loop across a template variable arrayref of scalar elements dumping their values, specifically by executing a template block.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

hash_loop_template

Loop across a template variable hashref of scalar values dumping both key and value, specifically by executing a template block.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

records_loop_template

Loop across a template variable arrayref of hashrefs, as per a result-set of records, dumping each record, specifically by executing a template block.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

constant_if_literal

Conditionally choose to insert some content, by any means available, if a constant value is true.

This tests for constant-folded optimizations.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

variable_if_literal

Conditionally choose to insert some content, by any means available, if a template variable is true.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

constant_if_else_literal

Conditionally choose to insert some content or some alternate content, by any means available, depending on whether a constant value is true or false.

This tests for constant-folded optimizations.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

variable_if_else_literal

Conditionally choose to insert some content or some alternate content, by any means available, depending on whether a template variable is true or false.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

constant_if_template

Conditionally choose to insert some content, specifically by execution of a template block, if a constant value is true.

This tests for constant-folded optimizations.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

variable_if_template

Conditionally choose to insert some content, specifically by execution of a template block, if a template variable is true.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

constant_if_else_template

Conditionally choose to insert some content or some alternate content, specifically by execution of a template block, depending on whether a constant value is true or false.

This tests for constant-folded optimizations.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

variable_if_else_template

Conditionally choose to insert some content or some alternate content, specifically by execution of a template block, depending on whether a template variable is true or false.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

constant_expression

Insert the result of evaluating an expression composed of constant terms.

This tests for constant-folded optimizations.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

variable_expression

Insert the result of evaluating an expression composed of template variables.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

complex_variable_expression

Insert the result of evaluating a complicated expression composed of template variables.

This is designed to stress the expression handling code of an engine.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

constant_function

Insert the result of a function call (or equivilent, such as vmethod) within a template expression, on a constant literal.

This tests for constant-folded optimizations.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

variable_function

Insert the result of a function call (or equivilent, such as vmethod) within a template expression, on a template variable.

1 repeat
1 repeat
15 repeats
15 repeats
30 repeats
30 repeats
performance drop-off
performance drop-off

Related Reports

cache_type
purity
syntax_type
© 2009-2013 Sam Graham, unless otherwise noted. All rights reserved.