Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created June 16, 2010 06:41
Show Gist options
  • Save fujiwara/440244 to your computer and use it in GitHub Desktop.
Save fujiwara/440244 to your computer and use it in GitHub Desktop.
0.1031
Benchmark: running tx for at least 3 CPU seconds...
tx: 4 wallclock secs ( 2.90 usr + 0.27 sys = 3.17 CPU) @ 28618.30/s (n=90720)
0.1032
Benchmark: running tx for at least 3 CPU seconds...
tx: 4 wallclock secs ( 2.80 usr + 0.36 sys = 3.16 CPU) @ 3044.62/s (n=9621)
0.1033
Benchmark: running tx for at least 3 CPU seconds...
tx: 3 wallclock secs ( 2.85 usr + 0.35 sys = 3.20 CPU) @ 3010.00/s (n=9632)
use strict;
use Text::Xslate;
use Benchmark qw/ :all /;
use Path::Class qw/ file /;
file("test.tx")->openw->print(q{[% FOR i IN list %] [% i %] [% END %]});
my $tx = Text::Xslate->new( syntax => "TTerse" );
print $tx->VERSION, "\n";
timethese 0, {
tx => sub {
$tx->render("test.tx", { list => [ 1 .. 100 ] });
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment