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