Is it just me, or is Haml 4 slower than Haml 3.2? I created a sample haml page using html2haml (about 200 lines of haml code), and used the benchmark script I found at http://www.coffeepowered.net/2011/06/17/making-haml-faster/:
TIMES = 100 source = open(File.expand_path(File.join(File.dirname(__FILE__), "sample.haml"))).read puts "Using Haml version: #{Haml::VERSION}" Benchmark.bmbm do |x| x.report("Render time") do TIMES.times do engine = Haml::Engine.new source engine.render :ugly => true end end end With Haml 3.1.4 I get: Using Haml version: 3.1.4 (Separated Sally) Rehearsal ----------------------------------------------- Render time 2.170000 0.030000 2.200000 ( 2.195480) -------------------------------------- total: 2.200000sec user system total real Render time 2.140000 0.010000 2.150000 ( 2.160262) And with Haml 4.0.0 I get: Using Haml version: 4.0.0 Rehearsal ----------------------------------------------- Render time 2.310000 0.050000 2.360000 ( 2.361094) -------------------------------------- total: 2.360000sec user system total real Render time 2.250000 0.030000 2.280000 ( 2.287790) I thought Haml 4 was supposed to be faster than 3.1.4? Am I missing something? -- You received this message because you are subscribed to the Google Groups "Haml" group. To unsubscribe from this group and stop receiving emails from it, send an email to haml+unsubscr...@googlegroups.com. To post to this group, send email to haml@googlegroups.com. Visit this group at http://groups.google.com/group/haml?hl=en. For more options, visit https://groups.google.com/groups/opt_out.