Sha256: 979c44e6ad8452b97f66e7cda95ddf67a272189ceb99f1ee8a975f6d3e459ddc

Contents?: true

Size: 470 Bytes

Versions: 59

Compression:

Stored size: 470 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'), File.dirname(__FILE__))

require 'slim'
require 'context'
require 'diffbench'

content = File.read(File.dirname(__FILE__) + '/view.slim')
engine = Slim::Engine.new
template = Slim::Template.new { content }
context = Context.new

DiffBench.bm do
  report("Parse") do
    2000.times { engine.call(content) }
  end
  report("Render") do
    100000.times { template.render(context) }
  end
end

Version data entries

59 entries across 59 versions & 5 rubygems

Version Path
slim-3.0.3 benchmarks/run-diffbench.rb
slim-3.0.2 benchmarks/run-diffbench.rb
slim-3.0.1 benchmarks/run-diffbench.rb
slim-3.0.0 benchmarks/run-diffbench.rb
slim-3.0.0.beta.3 benchmarks/run-diffbench.rb
slim-3.0.0.beta.2 benchmarks/run-diffbench.rb
slim-2.1.0 benchmarks/run-diffbench.rb
slim-2.0.3 benchmarks/run-diffbench.rb
slim-2.0.2 benchmarks/run-diffbench.rb
slim-2.0.1 benchmarks/run-diffbench.rb
slim-2.0.0 benchmarks/run-diffbench.rb
slim-1.3.9 benchmarks/run-diffbench.rb
slim-1.3.8 benchmarks/run-diffbench.rb
slim-1.3.6 benchmarks/run-diffbench.rb
slim-1.3.5 benchmarks/run-diffbench.rb
slim-1.3.4 benchmarks/run-diffbench.rb
slim-1.3.3 benchmarks/run-diffbench.rb
slim-1.3.2 benchmarks/run-diffbench.rb
slim-1.3.0 benchmarks/run-diffbench.rb