Sha256: 528c8e51c73986f1496d7a1d73875a471d547790a297760286864c0a9a3b5404
Contents?: true
Size: 951 Bytes
Versions: 31
Compression:
Stored size: 951 Bytes
Contents
# Original: https://github.com/amatsuda/string_template/blob/master/benchmark.rb require 'benchmark_driver' Benchmark.driver(repeat_count: 8) do |x| x.prelude %{ require 'rails' require 'action_view' require 'string_template' StringTemplate::Railtie.run_initializers require 'hamlit' Hamlit::Railtie.run_initializers Hamlit::RailsTemplate.set_options(escape_html: false, generator: Temple::Generators::ArrayBuffer) require 'action_view/base' (view = Class.new(ActionView::Base).new(ActionView::LookupContext.new(''))).instance_variable_set(:@world, 'world!') # compile template hello = 'benchmark/dynamic_merger/hello' view.render(template: hello, handlers: 'string') view.render(template: hello, handlers: 'haml') } x.report 'string', %{ view.render(template: hello, handlers: 'string') } x.report 'hamlit', %{ view.render(template: hello, handlers: 'haml') } x.loop_count 100_000 end
Version data entries
31 entries across 31 versions & 1 rubygems