Skip to content

Instantly share code, notes, and snippets.

@chanks
Created August 18, 2010 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chanks/536231 to your computer and use it in GitHub Desktop.
Save chanks/536231 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'benchmark'
require 'haml'
engine = Haml::Engine.new(File.read("template.haml"))
Benchmark.bm do |x|
x.report { 1000.times{ engine.render } }
end
!!!
%html
%head
%title Page Title
%body
#header
.container
#logo
%ul#nav
#wrapper
#content.container
#flash.ui-state-highlight.ui-corner-all
%span.ui-icon.ui-icon-info
#flash.ui-state-error.ui-corner-all
%span.ui-icon.ui-icon-alert
.clear
#footer-wrapper
#fine-print.container
.prefix-1.grid-11
.suffix-1.grid-11.right
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment