prelude: | require 'erb' template = < <%= title %>

<%= title %>

<%= content %>

EOS title = "hello world!" content = "hello world!\n" * 10 benchmarks: - name: ERB compiling benchmark: ERB.new(template) loop_count: 10000 - name: ERB rendering prelude: | src = "def self.render(title, content); #{ERB.new(template).src}; end" mod = Module.new mod.instance_eval(src, "(ERB)") benchmark: mod.render(title, content) loop_count: 100000