Perl Template Roundup October 2010 Performance vs Variant Report: shared_memory_cache

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

Chart Key

VariantDescription
TS_CHITemplate::Sandbox (1.04_01) with CHI (0.36) caching
TS_FMMTemplate::Sandbox (1.04_01) with Cache::FastMmap (1.36) caching
TS_CHITemplate::Sandbox (1.04_01) with CHI (0.36) caching
TS_FMMTemplate::Sandbox (1.04_01) with Cache::FastMmap (1.36) caching

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

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