Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (53 sloc) 3.45 KB
<!doctype html>
<title>Benchmarking Xslate</title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<div class="wrapper">
<div class="header">
<h1>Xslate Benchmarks</h1>
<div class="description">
Benchmark results against other template engines
<div id="content">
<div class="section">
<p>The <a href="">Xslate</a> engine is designed, and performs best in, a <em>persistent</em> environment where the same instance of Text::Xslate can be reused, and where the intermediary data structure can be cached.</p>
<p>In this page we will show you benchmarks from two different scenarios. One is for a persistent environemnt like FastCGI and Starman. The other is for a non-persistent environment, perhaps when using from a command line tool or in CGI script.</p>
<p>If you're looking for a more thorough comparison for the template engines available for Perl5, you probably should look at <a href="">Sam Graham's Perl Template Roundup</a></p>
<div class="section clearfix">
<h2>"Rich" Environment</h2>
<div style="float: right"><img width="400" height="300" src="img/benchmark_rich_env.png" /></div>
<p>Here's the graph showing the benchmark results for a "rich" environment. You can see that Xslate performs at a pace unparalleled by any other template engine, coming to at least 30 times faster its nearest competitor.</p>
<p>This benchmark assumes the following:</p>
<li>You have access to a C compiler, therefore you are free to use XS-based modules</li>
<li>You can reuse the same instance of each template engines</li>
<p>The benchmark script (<a href="">found here</a>), simply uses each template engine to list a set of data. In this case we're repeating the same data 100 times per template.</p>
<div class="section clearfix">
<h2>"Poor" Environment</h2>
<div style="float: right"><img width="400" height="300" src="img/benchmark_poor_env.png" /></div>
<div class="section clearfix">
<p>Here's the graph showing the benchmark results for a "poor" environment. Unlike the "rich" environment, here Xslate only performs slightly faster than TT2, and Text::MicroTemplate comes out as a clear winner.</p>
<p>This benchmark assumes, or is limited by, the following criteria:</p>
<li>Instances for each engine are created for every run, just like a CGI script would do.</li>
<li>You DO NOT have access to a C compiler.</li>
<li>Modules that require an XS backend are excluded. ClearSilver is not used, and HTML::Template is used instead of HTML::Template::Pro.</li>
<p>The benchmark script (<a href="">found here</a>) is equivalent to with the caveats mentioned above.</p>
<div class="footer">
If you have requests for this web site, please send pull request on <a href="">github</a>.