Skip to content

Instantly share code, notes, and snippets.

@gfx
Created July 12, 2010 07:00
Show Gist options
  • Select an option

  • Save gfx/472196 to your computer and use it in GitHub Desktop.

Select an option

Save gfx/472196 to your computer and use it in GitHub Desktop.
# http://github.com/gfx/p5-Benchmark-Memory
$ perl -Ilib example/template.pl
Perl/5.10.1 i686-linux
Text::Xslate/0.1041
Text::MicroTemplate/0.13
Text::MicroTemplate::Extended/0.11
Template/2.22
# 'tiny'は小さなテンプレート
Memory Usage for 'tiny' (1): # コンパイルあり
MTEx : 1.055 MiB (times: user=0.020, sys=0.000)
TT : 3.457 MiB (times: user=0.090, sys=0.000)
Xslate: 2.738 MiB (times: user=0.070, sys=0.000)
Memory Usage for 'tiny' (2): # コンパイル済み
MTEx : 1.055 MiB (times: user=0.020, sys=0.000)
TT : 1.855 MiB (times: user=0.050, sys=0.000)
Xslate: 1.078 MiB (times: user=0.020, sys=0.000)
# 'large'は'tiny'を128個インクルードするテンプレート
Memory Usage for 'large' (1): # コンパイルあり
MTEx : 1.402 MiB (times: user=0.110, sys=0.010)
TT : 5.656 MiB (times: user=0.430, sys=0.050)
Xslate: 3.133 MiB (times: user=0.630, sys=0.030)
Memory Usage for 'large' (2): # コンパイルなし
MTEx : 1.402 MiB (times: user=0.110, sys=0.010)
TT : 4.008 MiB (times: user=0.170, sys=0.010)
Xslate: 1.332 MiB (times: user=0.160, sys=0.000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment