Sha256: de6587fe76f0ca76d03ee14cf8e0326bb7938966cea592a1aed95bab5131a42d
Contents?: true
Size: 1.11 KB
Versions: 76
Compression:
Stored size: 1.11 KB
Contents
require 'rubygems' require 'erubis' require 'erubis/tiny' require 'erb' require "benchmark" require File.join(File.dirname(__FILE__), '..', 'lib', 'yard') def rungen YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc')) YARD::Registry.at("YARD::CodeObjects::Base").format(:format => :html) end Benchmark.bmbm do |x| x.report("erubis") do eval <<-eof module YARD; module Templates; module Template def erb_with(str, x) Erubis::Eruby.new(str) end end end end eof rungen end x.report("fast-erubis") do eval <<-eof module YARD; module Templates; module Template def erb_with(str, x) Erubis::FastEruby.new(str) end end end end eof rungen end x.report("tiny-erubis") do eval <<-eof module YARD; module Templates; module Template def erb_with(str, x) Erubis::TinyEruby.new(str) end end end end eof rungen end x.report("erb") do eval <<-eof module YARD; module Templates; module Template def erb_with(str, x) ERB.new(str, nil) end end end end eof rungen end end
Version data entries
76 entries across 59 versions & 8 rubygems