Sha256: 97e2bf2263a1593b878abc3e3a874c0ec863679b0e627407049b037f5cb50d65
Contents?: true
Size: 1.72 KB
Versions: 3
Compression:
Stored size: 1.72 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require "rbench" require 'hashie' require 'erector' require File.dirname(__FILE__) + "/../../lib/garterbelt" require File.dirname(__FILE__) + '/templates/stocking' require File.dirname(__FILE__) + '/templates/erector' TIMES = 500_000 RBench.run(TIMES) do LoungeTemplate.max_pool_size TIMES/10 column :garterbelt column :erector report "Simple Page Rendering" do user = Hashie::Mash.new(:username => 'baccigalupi', :email => 'baccigalupi@example.com', :name => 'Kane Baccigalupi') erector { ErectorTemplate.new(:user => user) } garterbelt { GarterbeltTemplate.new(:user => user) } end end # 4/11/2011, version 0.0.1, standard pooling # GARTERBELT = pooling at standard 1000 instances # GARTERBELT_2 = pooling at 10% of sample time # 10_000 times # GARTERBELT | ERECTOR | # --------------------------------------------------------------------- # Simple Page Rendering 0.164 | 0.205 | 20% faster # 100_000 times # GARTERBELT | GARTERBELT_2 | ERECTOR | # --------------------------------------------------------------------- # Simple Page Rendering 1.857 | 1.828 | 1.932 | 3.8-5.3%/ faster # 200_000 times # GARTERBELT | GARTERBELT_2 | ERECTOR | # --------------------------------------------------------------------- # Simple Page Rendering 3.743 | 3.660 | 3.846 | 2.7-4.8% faster # 500_000 times # GARTERBELT | GARTERBELT_2 | ERECTOR | # --------------------------------------------------------------------- # Simple Page Rendering 9.420 | 9.422 | 9.637 | 2.3-2.2% faster
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
garterbelt-0.0.4 | spec/benchmark/vs_erector.rb |
garterbelt-0.0.3 | spec/benchmark/vs_erector.rb |
garterbelt-0.0.2 | spec/benchmark/vs_erector.rb |