]> Dogcows Code - chaz/p5-CGI-Ex/blob - samples/benchmark/bench_various_templaters.pl
CGI::Ex 2.14
[chaz/p5-CGI-Ex] / samples / benchmark / bench_various_templaters.pl
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 bench_various_templaters.pl - test the relative performance of several different types of template engines.
6
7 =cut
8
9 use strict;
10 use Benchmark qw(timethese cmpthese);
11
12 use Template;
13 use Template::Stash;
14 use Template::Stash::XS;
15 use Template::Parser::CET;
16 use Text::Template;
17 use Text::Tmpl;
18 use HTML::Template;
19 use HTML::Template::Compiled;
20 use HTML::Template::Expr;
21 use HTML::Template::JIT;
22 use CGI::Ex::Dump qw(debug);
23 use CGI::Ex::Template;
24 use CGI::Ex::Template::XS;
25 use POSIX qw(tmpnam);
26 use File::Path qw(mkpath rmtree);
27
28 ###----------------------------------------------------------------###
29
30 my $names = {
31 CET => 'CGI::Ex::Template using TT interface',
32 CETX => 'CGI::Ex::Template::XS using TT interface',
33 CETH => 'CGI::Ex::Template using HTML::Template interface',
34 CETXH => 'CGI::Ex::Template::XS using HTML::Template interface',
35 CETXHp => 'CGI::Ex::Template::XS using HTML::Template interface - Perl code eval based',
36 CETXTMPL => 'CGI::Ex::Temmplate::XS using Text::Tmpl interface',
37 HT => 'HTML::Template',
38 HTE => 'HTML::Template::Expr',
39 HTJ => 'HTML::Template::JIT - Compiled to C template',
40 HTC => 'HTML::Template::Compiled',
41 TextTemplate => 'Text::Template - Perl code eval based',
42 TT => 'Template::Toolkit',
43 TTX => 'Template::Toolkit with Stash::XS',
44 TTXCET => 'Template::Toolkit with Stash::XS and Template::Parser::CET',
45 TMPL => 'Text::Tmpl - Engine is C based',
46
47 mem => 'Compiled in memory',
48 file => 'Loaded from file',
49 str => 'From string ref',
50 };
51
52 ###----------------------------------------------------------------###
53 ### get cache and compile dirs ready
54
55 my $dir = tmpnam;
56 my $dir2 = "$dir.cache";
57 mkpath($dir);
58 mkpath($dir2);
59 END {rmtree $dir; rmtree $dir2};
60 my @dirs = ($dir);
61
62 ###----------------------------------------------------------------###
63
64 my $form = {
65 foo => 'bar',
66 pass_in_something => 'what ever you want',
67 };
68
69 my $filler = ((" foo" x 10)."\n") x 10;
70
71 my $stash_t = {
72 shell_header => "This is a header",
73 shell_footer => "This is a footer",
74 shell_start => "<html>",
75 shell_end => "<end>",
76 a_stuff => [qw(one two three four)],
77 };
78
79 my $stash_ht = {
80 shell_header => "This is a header",
81 shell_footer => "This is a footer",
82 shell_start => "<html>",
83 shell_end => "<end>",
84 a_stuff => [map {{name => $_}} qw(one two three four)],
85 };
86
87 $FOO::shell_header = $FOO::shell_footer = $FOO::shell_start = $FOO::shell_end = $FOO::a_stuff;
88 $FOO::shell_header = "This is a header";
89 $FOO::shell_footer = "This is a footer";
90 $FOO::shell_start = "<html>";
91 $FOO::shell_end = "<end>";
92 $FOO::a_stuff = [qw(one two three four)];
93
94
95 ###----------------------------------------------------------------###
96 ### TT style template
97
98 my $content_tt = <<"DOC";
99 [% shell_header %]
100 [% shell_start %]
101 $filler
102
103 [% IF foo %]
104 This is some text.
105 [% END %]
106
107 [% FOREACH i IN a_stuff %][% i %][% END %]
108 [% pass_in_something %]
109
110 $filler
111 [% shell_end %]
112 [% shell_footer %]
113 DOC
114
115 if (open (my $fh, ">$dir/foo.tt")) {
116 print $fh $content_tt;
117 close $fh;
118 }
119
120 ###----------------------------------------------------------------###
121 ### HTML::Template style
122
123 my $content_ht = <<"DOC";
124 <TMPL_VAR NAME=shell_header>
125 <TMPL_VAR NAME=shell_start>
126 $filler
127
128 <TMPL_IF NAME=foo>
129 This is some text.
130 </TMPL_IF>
131
132 <TMPL_LOOP NAME=a_stuff><TMPL_VAR NAME=name></TMPL_LOOP>
133 <TMPL_VAR NAME=pass_in_something>
134
135 $filler
136 <TMPL_VAR NAME=shell_end>
137 <TMPL_VAR NAME=shell_footer>
138 DOC
139
140 if (open (my $fh, ">$dir/foo.ht")) {
141 print $fh $content_ht;
142 close $fh;
143 }
144
145 ###----------------------------------------------------------------###
146 ### Text::Template style template
147
148 my $content_p = <<"DOC";
149 {\$shell_header}
150 {\$shell_start}
151 $filler
152
153 { if (\$foo) {
154 \$OUT .= "
155 This is some text.
156 ";
157 }
158 }
159
160 { \$OUT .= \$_ foreach \@\$a_stuff; }
161 {\$pass_in_something}
162
163 $filler
164 {\$shell_end}
165 {\$shell_footer}
166 DOC
167
168 ###----------------------------------------------------------------###
169 ### Tmpl style template
170
171 my $content_tmpl = <<"DOC";
172 <!--echo \$shell_header-->
173 <!--echo \$shell_start-->
174 $filler
175
176 <!-- if \$foo -->
177 This is some text.
178 <!-- endif -->
179
180 <!-- loop "a_stuff" --><!-- echo \$name --><!-- endloop -->
181 <!-- echo \$pass_in_something -->
182
183 $filler
184 <!-- echo \$shell_end -->
185 <!-- echo \$shell_footer -->
186 DOC
187
188 if (open (my $fh, ">$dir/foo.tmpl")) {
189 print $fh $content_tmpl;
190 close $fh;
191 }
192
193 ###----------------------------------------------------------------###
194 ### The TT interface allows for a single object to be cached and reused.
195
196 my $tt = Template->new( INCLUDE_PATH => \@dirs, STASH => Template::Stash->new($stash_t));
197 my $ttx = Template->new( INCLUDE_PATH => \@dirs, STASH => Template::Stash::XS->new($stash_t));
198 my $ct = CGI::Ex::Template->new( INCLUDE_PATH => \@dirs, VARIABLES => $stash_t);
199 my $ctx = CGI::Ex::Template::XS->new(INCLUDE_PATH => \@dirs, VARIABLES => $stash_t);
200
201 ###----------------------------------------------------------------###
202 my %CETH_DOCUMENTS;
203 my %CETXH_DOCUMENTS;
204 my %CETXHp_DOCUMENTS;
205
206
207 my $tests = {
208
209 ###----------------------------------------------------------------###
210 ### compile means item was compiled to optree or perlcode and stored on disk
211
212 TT_file => sub {
213 my $tt = Template->new(INCLUDE_PATH => \@dirs, STASH => Template::Stash->new($stash_t), COMPILE_DIR => $dir2);
214 my $out = ""; $tt->process('foo.tt', $form, \$out); $out;
215 },
216 TTX_file => sub {
217 my $tt = Template->new(INCLUDE_PATH => \@dirs, STASH => Template::Stash::XS->new($stash_t), COMPILE_DIR => $dir2);
218 my $out = ""; $tt->process('foo.tt', $form, \$out); $out;
219 },
220 # CET_file => sub {
221 # my $t = CGI::Ex::Template->new(INCLUDE_PATH => \@dirs, VARIABLES => $stash_t, COMPILE_DIR => $dir2);
222 # my $out = ''; $t->process('foo.tt', $form, \$out); $out;
223 # },
224 # CETX_file => sub {
225 # my $t = CGI::Ex::Template::XS->new(INCLUDE_PATH => \@dirs, VARIABLES => $stash_t, COMPILE_DIR => $dir2);
226 # my $out = ''; $t->process('foo.tt', $form, \$out); $out;
227 # },
228
229 CETH_file => sub {
230 my $ht = CGI::Ex::Template->new(type => 'filename', source => "foo.ht", file_cache => 1, path => \@dirs, file_cache_dir => $dir2, CASE_SENSITVE=>1);
231 $ht->{'_documents'} = \%CETH_DOCUMENTS;
232 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
233 },
234 CETXH_file => sub {
235 my $ht = CGI::Ex::Template::XS->new(type => 'filename', source => "foo.ht", file_cache => 1, path => \@dirs, file_cache_dir => $dir2,
236 CASE_SENSITVE=>1);
237 $ht->{'_documents'} = \%CETXH_DOCUMENTS;
238 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
239 },
240 CETXHp_file => sub {
241 my $ht = CGI::Ex::Template::XS->new(type => 'filename', source => "foo.ht", file_cache => 1, path => \@dirs, file_cache_dir => $dir2,
242 CASE_SENSITVE=>1, compile_perl => 1, cache => 1);
243 $ht->{'_documents'} = \%CETXHp_DOCUMENTS;
244 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
245 },
246 HT_file => sub {
247 my $ht = HTML::Template->new(type => 'filename', source => "foo.ht", file_cache => 1, path => \@dirs, file_cache_dir => $dir2, CASE_SENSITVE=>1);
248 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
249 },
250 HTC_file => sub {
251 my $ht = HTML::Template::Compiled->new(type => 'filename', source => "foo.ht", file_cache => 1, path => \@dirs, file_cache_dir => $dir2, CASE_SENSITVE=>1);
252 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
253 },
254 TMPL_file => sub {
255 my $tt = Text::Tmpl->new;
256 for my $ref (@{ $stash_ht->{'a_stuff'} }) {
257 $tt->loop_iteration('a_stuff')->set_values($ref);
258 }
259 $tt->set_values($stash_ht);
260 $tt->set_values($form);
261 $tt->set_delimiters('<!--','-->');
262 $tt->set_dir("$dir/");
263 $tt->set_strip(0);
264 my $out = $tt->parse_file("foo.tmpl");
265 },
266 # CETXTMPL_file => sub {
267 # my $tt = CGI::Ex::Template::XS->new;
268 # for my $ref (@{ $stash_ht->{'a_stuff'} }) {
269 # $tt->loop_iteration('a_stuff')->set_values($ref);
270 # }
271 # $tt->set_values($stash_ht);
272 # $tt->set_values($form);
273 # $tt->set_delimiters('<!--','-->');
274 # $tt->set_dir("$dir/");
275 # $tt->set_strip(0);
276 # my $out = $tt->parse_file("foo.tmpl");
277 # },
278
279 ###----------------------------------------------------------------###
280 ### str infers that we are pulling from a string reference
281
282 TextTemplate_str => sub {
283 my $pt = Text::Template->new(
284 TYPE => 'STRING',
285 SOURCE => $content_p,
286 HASH => $form);
287 my $out = $pt->fill_in(PACKAGE => 'FOO', HASH => $form);
288 },
289
290 TT_str => sub {
291 my $t = Template->new(STASH => Template::Stash->new($stash_t));
292 my $out = ""; $t->process(\$content_tt, $form, \$out); $out;
293 },
294 TTX_str => sub {
295 my $t = Template->new(STASH => Template::Stash::XS->new($stash_t));
296 my $out = ""; $t->process(\$content_tt, $form, \$out); $out;
297 },
298 TTXCET_str => sub {
299 my $t = Template->new(STASH => Template::Stash::XS->new($stash_t), PARSER => Template::Parser::CET->new);
300 my $out = ""; $t->process(\$content_tt, $form, \$out); $out;
301 },
302 # CET_str => sub {
303 # my $t = CGI::Ex::Template->new(VARIABLES => $stash_t);
304 # my $out = ""; $t->process(\$content_tt, $form, \$out); $out;
305 # },
306 # CETX_str => sub {
307 # my $t = CGI::Ex::Template::XS->new(VARIABLES => $stash_t);
308 # my $out = ""; $t->process(\$content_tt, $form, \$out); $out;
309 # },
310
311 CETH_str => sub {
312 my $ht = CGI::Ex::Template->new( type => 'scalarref', source => \$content_ht, CASE_SENSITVE=>1);
313 $ht->{'_documents'} = \%CETH_DOCUMENTS;
314 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
315 },
316 CETXH_str => sub {
317 my $ht = CGI::Ex::Template::XS->new(type => 'scalarref', source => \$content_ht, CASE_SENSITVE=>1);
318 $ht->{'_documents'} = \%CETXH_DOCUMENTS;
319 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
320 },
321 CETXHp_str => sub {
322 my $ht = CGI::Ex::Template::XS->new(type => 'scalarref', source => \$content_ht, CASE_SENSITVE=>1, compile_perl => 1, cache => 1);
323 $ht->{'_documents'} = \%CETXHp_DOCUMENTS;
324 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
325 },
326 HT_str => sub {
327 my $ht = HTML::Template->new( type => 'scalarref', source => \$content_ht, CASE_SENSITVE=>1);
328 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
329 },
330 HTE_str => sub {
331 my $ht = HTML::Template::Expr->new( type => 'scalarref', source => \$content_ht, CASE_SENSITVE=>1);
332 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
333 },
334 HTC_str => sub {
335 my $ht = HTML::Template::Compiled->new(type => 'scalarref', source => \$content_ht, CASE_SENSITVE=>1);
336 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
337 },
338 TMPL_str => sub {
339 my $tt = Text::Tmpl->new;
340 for my $ref (@{ $stash_ht->{'a_stuff'} }) {
341 $tt->loop_iteration('a_stuff')->set_values($ref);
342 }
343 $tt->set_values($stash_ht);
344 $tt->set_values($form);
345 $tt->set_delimiters('<!--','-->');
346 $tt->set_dir("$dir/");
347 $tt->set_strip(0);
348 my $out = $tt->parse_string($content_tmpl);
349 },
350
351 ###----------------------------------------------------------------###
352 ### mem indicates that the compiled form is stored in memory
353
354 TT_mem => sub { my $out = ""; $tt->process( 'foo.tt', $form, \$out); $out },
355 TTX_mem => sub { my $out = ""; $ttx->process('foo.tt', $form, \$out); $out },
356 # CET_mem => sub { my $out = ""; $ct->process( 'foo.tt', $form, \$out); $out },
357 # CETX_mem => sub { my $out = ""; $ctx->process('foo.tt', $form, \$out); $out },
358
359 CETH_mem => sub {
360 my $ht = CGI::Ex::Template->new( filename => "foo.ht", path => \@dirs, cache => 1, CASE_SENSITVE=>1);
361 $ht->{'_documents'} = \%CETH_DOCUMENTS;
362 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
363 },
364 CETXH_mem => sub {
365 my $ht = CGI::Ex::Template::XS->new(filename => "foo.ht", path => \@dirs, cache => 1, CASE_SENSITVE=>1);
366 $ht->{'_documents'} = \%CETXH_DOCUMENTS;
367 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
368 },
369 CETXHp_mem => sub {
370 my $ht = CGI::Ex::Template::XS->new(filename => "foo.ht", path => \@dirs, cache => 1, CASE_SENSITVE=>1, compile_perl => 1, cache => 1);
371 $ht->{'_documents'} = \%CETXHp_DOCUMENTS;
372 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
373 },
374 HT_mem => sub {
375 my $ht = HTML::Template->new( filename => "foo.ht", path => \@dirs, cache => 1, CASE_SENSITVE=>1);
376 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
377 },
378 HTC_mem => sub {
379 my $ht = HTML::Template::Compiled->new( filename => "foo.ht", path => \@dirs, cache => 1, CASE_SENSITVE=>1);
380 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
381 },
382 HTE_mem => sub {
383 my $ht = HTML::Template::Expr->new( filename => "foo.ht", path => \@dirs, cache => 1, CASE_SENSITVE=>1);
384 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
385 },
386 HTJ_mem => sub { # this is interesting - it is compiled - but it is pulled into memory just once
387 my $ht = HTML::Template::JIT->new( filename => "foo.ht", path => \@dirs, jit_path => $dir2, CASE_SENSITVE=>1);
388 $ht->param($stash_ht); $ht->param($form); my $out = $ht->output;
389 },
390 };
391
392 my $test = $tests->{'TT_str'}->();
393 foreach my $name (sort keys %$tests) {
394 if ($test ne $tests->{$name}->()) {
395 print "--------------------------TT_str-------\n";
396 print $test;
397 print "--------------------------$name--------\n";
398 print $tests->{$name}->();
399 die "$name did not match TT_str output\n";
400 }
401 $name =~ /(\w+)_(\w+)/;
402 print "$name - $names->{$1} - ($names->{$2})\n";
403 }
404
405 ###----------------------------------------------------------------###
406 ### and now - the tests - grouped by common capability
407
408 my %mem_tests = map {($_ => $tests->{$_})} grep {/_mem$/} keys %$tests;
409 my %cpl_tests = map {($_ => $tests->{$_})} grep {/_file$/} keys %$tests;
410 my %str_tests = map {($_ => $tests->{$_})} grep {/_str$/} keys %$tests;
411
412 print "------------------------------------------------------------------------\n";
413 print "From a string or scalarref tests\n";
414 cmpthese timethese (-2, \%str_tests);
415
416 print "------------------------------------------------------------------------\n";
417 print "Compiled and cached on the file system tests\n";
418 cmpthese timethese (-2, \%cpl_tests);
419
420 print "------------------------------------------------------------------------\n";
421 print "Cached in memory tests\n";
422 cmpthese timethese (-2, \%mem_tests);
423
424 #print "------------------------------------------------------------------------\n";
425 #print "All variants together\n";
426 #cmpthese timethese (-2, $tests);
427
428 ###----------------------------------------------------------------###
429
430 __END__
431
432 =head1 SAMPLE OUTPUT v2.13
433
434 CETH_file - CGI::Ex::Template using HTML::Template interface - (Loaded from file)
435 CETH_mem - CGI::Ex::Template using HTML::Template interface - (Compiled in memory)
436 CETH_str - CGI::Ex::Template using HTML::Template interface - (From string ref)
437 CETXH_file - CGI::Ex::Template::XS using HTML::Template interface - (Loaded from file)
438 CETXH_mem - CGI::Ex::Template::XS using HTML::Template interface - (Compiled in memory)
439 CETXH_str - CGI::Ex::Template::XS using HTML::Template interface - (From string ref)
440 CETX_file - CGI::Ex::Template::XS using TT interface - (Loaded from file)
441 CETX_mem - CGI::Ex::Template::XS using TT interface - (Compiled in memory)
442 CETX_str - CGI::Ex::Template::XS using TT interface - (From string ref)
443 CET_file - CGI::Ex::Template using TT interface - (Loaded from file)
444 CET_mem - CGI::Ex::Template using TT interface - (Compiled in memory)
445 CET_str - CGI::Ex::Template using TT interface - (From string ref)
446 HTE_mem - HTML::Template::Expr - (Compiled in memory)
447 HTE_str - HTML::Template::Expr - (From string ref)
448 HTJ_mem - HTML::Template::JIT - Compiled to C template - (Compiled in memory)
449 HT_file - HTML::Template - (Loaded from file)
450 HT_mem - HTML::Template - (Compiled in memory)
451 HT_str - HTML::Template - (From string ref)
452 TTXCET_str - Template::Toolkit with Stash::XS and Template::Parser::CET - (From string ref)
453 TTX_file - Template::Toolkit with Stash::XS - (Loaded from file)
454 TTX_mem - Template::Toolkit with Stash::XS - (Compiled in memory)
455 TTX_str - Template::Toolkit with Stash::XS - (From string ref)
456 TT_file - Template::Toolkit - (Loaded from file)
457 TT_mem - Template::Toolkit - (Compiled in memory)
458 TT_str - Template::Toolkit - (From string ref)
459 TextTemplate_str - Text::Template - Perl code eval based - (From string ref)
460 ------------------------------------------------------------------------
461 From a string or scalarref tests
462 Benchmark: running CETH_str, CETXH_str, CETX_str, CET_str, HTE_str, HT_str, TTXCET_str, TTX_str, TT_str, TextTemplate_str for at least 2 CPU seconds...
463 CETH_str: 2 wallclock secs ( 2.18 usr + 0.00 sys = 2.18 CPU) @ 1449.08/s (n=3159)
464 CETXH_str: 2 wallclock secs ( 2.00 usr + 0.01 sys = 2.01 CPU) @ 1700.00/s (n=3417)
465 CETX_str: 2 wallclock secs ( 2.22 usr + 0.00 sys = 2.22 CPU) @ 1584.23/s (n=3517)
466 CET_str: 2 wallclock secs ( 2.14 usr + 0.00 sys = 2.14 CPU) @ 1333.18/s (n=2853)
467 HTE_str: 2 wallclock secs ( 2.07 usr + 0.00 sys = 2.07 CPU) @ 922.71/s (n=1910)
468 HT_str: 2 wallclock secs ( 2.13 usr + 0.00 sys = 2.13 CPU) @ 1221.13/s (n=2601)
469 TTXCET_str: 2 wallclock secs ( 2.01 usr + 0.01 sys = 2.02 CPU) @ 534.16/s (n=1079)
470 TTX_str: 2 wallclock secs ( 2.14 usr + 0.00 sys = 2.14 CPU) @ 312.62/s (n=669)
471 TT_str: 3 wallclock secs ( 2.12 usr + 0.01 sys = 2.13 CPU) @ 300.47/s (n=640)
472 TextTemplate_str: 2 wallclock secs ( 2.13 usr + 0.02 sys = 2.15 CPU) @ 1189.77/s (n=2558)
473 Rate TT_str TTX_str TTXCET_str HTE_str TextTemplate_str HT_str CET_str CETH_str CETX_str CETXH_str
474 TT_str 300/s -- -4% -44% -67% -75% -75% -77% -79% -81% -82%
475 TTX_str 313/s 4% -- -41% -66% -74% -74% -77% -78% -80% -82%
476 TTXCET_str 534/s 78% 71% -- -42% -55% -56% -60% -63% -66% -69%
477 HTE_str 923/s 207% 195% 73% -- -22% -24% -31% -36% -42% -46%
478 TextTemplate_str 1190/s 296% 281% 123% 29% -- -3% -11% -18% -25% -30%
479 HT_str 1221/s 306% 291% 129% 32% 3% -- -8% -16% -23% -28%
480 CET_str 1333/s 344% 326% 150% 44% 12% 9% -- -8% -16% -22%
481 CETH_str 1449/s 382% 364% 171% 57% 22% 19% 9% -- -9% -15%
482 CETX_str 1584/s 427% 407% 197% 72% 33% 30% 19% 9% -- -7%
483 CETXH_str 1700/s 466% 444% 218% 84% 43% 39% 28% 17% 7% --
484 ------------------------------------------------------------------------
485 Compiled and cached on the file system tests
486 Benchmark: running CETH_file, CETXH_file, CETX_file, CET_file, HT_file, TTX_file, TT_file for at least 2 CPU seconds...
487 CETH_file: 3 wallclock secs ( 2.14 usr + 0.02 sys = 2.16 CPU) @ 3106.02/s (n=6709)
488 CETXH_file: 2 wallclock secs ( 2.01 usr + 0.04 sys = 2.05 CPU) @ 4447.80/s (n=9118)
489 CETX_file: 3 wallclock secs ( 2.02 usr + 0.09 sys = 2.11 CPU) @ 3586.26/s (n=7567)
490 CET_file: 3 wallclock secs ( 2.16 usr + 0.05 sys = 2.21 CPU) @ 2432.13/s (n=5375)
491 HT_file: 2 wallclock secs ( 2.18 usr + 0.03 sys = 2.21 CPU) @ 1868.33/s (n=4129)
492 TTX_file: 2 wallclock secs ( 2.14 usr + 0.04 sys = 2.18 CPU) @ 820.64/s (n=1789)
493 TT_file: 2 wallclock secs ( 2.11 usr + 0.04 sys = 2.15 CPU) @ 733.02/s (n=1576)
494 Rate TT_file TTX_file HT_file CET_file CETH_file CETX_file CETXH_file
495 TT_file 733/s -- -11% -61% -70% -76% -80% -84%
496 TTX_file 821/s 12% -- -56% -66% -74% -77% -82%
497 HT_file 1868/s 155% 128% -- -23% -40% -48% -58%
498 CET_file 2432/s 232% 196% 30% -- -22% -32% -45%
499 CETH_file 3106/s 324% 278% 66% 28% -- -13% -30%
500 CETX_file 3586/s 389% 337% 92% 47% 15% -- -19%
501 CETXH_file 4448/s 507% 442% 138% 83% 43% 24% --
502 ------------------------------------------------------------------------
503 Cached in memory tests
504 Benchmark: running CETH_mem, CETXH_mem, CETX_mem, CET_mem, HTE_mem, HTJ_mem, HT_mem, TTX_mem, TT_mem for at least 2 CPU seconds...
505 CETH_mem: 2 wallclock secs ( 2.11 usr + 0.03 sys = 2.14 CPU) @ 3193.46/s (n=6834)
506 CETXH_mem: 2 wallclock secs ( 2.18 usr + 0.04 sys = 2.22 CPU) @ 4622.07/s (n=10261)
507 CETX_mem: 2 wallclock secs ( 2.02 usr + 0.10 sys = 2.12 CPU) @ 6334.43/s (n=13429)
508 CET_mem: 2 wallclock secs ( 2.16 usr + 0.04 sys = 2.20 CPU) @ 3946.82/s (n=8683)
509 HTE_mem: 2 wallclock secs ( 2.20 usr + 0.01 sys = 2.21 CPU) @ 1515.38/s (n=3349)
510 HTJ_mem: 2 wallclock secs ( 2.05 usr + 0.06 sys = 2.11 CPU) @ 5990.05/s (n=12639)
511 HT_mem: 2 wallclock secs ( 1.98 usr + 0.03 sys = 2.01 CPU) @ 2588.56/s (n=5203)
512 TTX_mem: 2 wallclock secs ( 2.07 usr + 0.03 sys = 2.10 CPU) @ 3254.29/s (n=6834)
513 TT_mem: 2 wallclock secs ( 2.18 usr + 0.02 sys = 2.20 CPU) @ 2217.73/s (n=4879)
514 Rate HTE_mem TT_mem HT_mem CETH_mem TTX_mem CET_mem CETXH_mem HTJ_mem CETX_mem
515 HTE_mem 1515/s -- -32% -41% -53% -53% -62% -67% -75% -76%
516 TT_mem 2218/s 46% -- -14% -31% -32% -44% -52% -63% -65%
517 HT_mem 2589/s 71% 17% -- -19% -20% -34% -44% -57% -59%
518 CETH_mem 3193/s 111% 44% 23% -- -2% -19% -31% -47% -50%
519 TTX_mem 3254/s 115% 47% 26% 2% -- -18% -30% -46% -49%
520 CET_mem 3947/s 160% 78% 52% 24% 21% -- -15% -34% -38%
521 CETXH_mem 4622/s 205% 108% 79% 45% 42% 17% -- -23% -27%
522 HTJ_mem 5990/s 295% 170% 131% 88% 84% 52% 30% -- -5%
523 CETX_mem 6334/s 318% 186% 145% 98% 95% 60% 37% 6% --
524
525 =cut
This page took 0.080297 seconds and 4 git commands to generate.