Sha256: 68c5a3a59402b14fcff3d6407f5c7bcb3038e36a8f9dc79cd9889ac921bd13e7

Contents?: true

Size: 525 Bytes

Versions: 13

Compression:

Stored size: 525 Bytes

Contents

# coding: UTF-8
# Thanks Kramdown for the inspiration!
require 'benchmark/ips'

require 'greenmat'
require 'bluecloth'
require 'kramdown'

markdown = File.read(File.join(File.dirname(__FILE__), "fixtures/benchmark.md"))

# Let's bench!
Benchmark.ips do |bench|
  bench.report("Greenmat") do
    Greenmat::Markdown.new(Greenmat::Render::HTML).render(markdown)
  end

  bench.report("BlueCloth") do
    BlueCloth.new(markdown).to_html
  end

  bench.report("Kramdown") do
    Kramdown::Document.new(markdown).to_html
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
greenmat-3.5.1.4 test/benchmark.rb
greenmat-3.5.1.3 test/benchmark.rb
greenmat-3.5.1.2 test/benchmark.rb
greenmat-3.5.1.1 test/benchmark.rb
greenmat-3.5.1.0 test/benchmark.rb
greenmat-3.2.2.4 test/benchmark.rb
greenmat-3.2.2.3 test/benchmark.rb
greenmat-3.2.2.2 test/benchmark.rb
greenmat-3.2.2.1 test/benchmark.rb
greenmat-3.2.2.0 test/benchmark.rb
greenmat-3.2.0.2 test/benchmark.rb
greenmat-3.2.0.1 test/benchmark.rb
greenmat-3.2.0.0 test/benchmark.rb