Permalink
Fetching contributors…
Cannot retrieve contributors at this time
292 lines (244 sloc) 10.1 KB

OrgRuby benchmarks

How to run the benchmarks (or trying out org-babel)

Within this folder there is a parsing_test.rb script which can be used to profile a quick benchmark of the current performance of the org-ruby library.

What follows are the results of my benchmark by using the built-in support for org-babel included in Emacs 24. (press C-c C-c when over the block to update the benchmark)

Platform: 1.8.7

For some reason performance is a bit better when using Ruby 1.8.7 than when using 1.9.2.

OrgRuby 0.6.0

source ~/.bashrc
rvm use 1.8.7 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_6_0" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_6_0" bundle exec ruby parsing_test.rb 

OrgRuby 0.6.2

source ~/.bashrc
rvm use 1.8.7 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_6_2" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_6_2" bundle exec ruby parsing_test.rb 

OrgRuby 0.6.3

source ~/.bashrc
rvm use 1.8.7 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_6_3" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_6_3" bundle exec ruby parsing_test.rb 

DEV

source ~/.bashrc
rvm use 1.8.7 > /dev/null
rvm info | grep full_version
bundle install > /dev/null
bundle exec ruby parsing_test.rb 

Platform: 1.9.2

Remember that 1.9.2 is sensible to encoding issues. (e.g. あいうえお)

OrgRuby 0.6.0

source ~/.bashrc
export LANG=en_US.UTF-8
rvm use 1.9.2 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_6_0" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_6_0" bundle exec ruby parsing_test.rb 

OrgRuby 0.6.2

source ~/.bashrc
export LANG=en_US.UTF-8
rvm use 1.9.2 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_6_2" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_6_2" bundle exec ruby parsing_test.rb 

OrgRuby 0.6.3

source ~/.bashrc
export LANG=en_US.UTF-8
rvm use 1.9.2 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_6_3" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_6_3" bundle exec ruby parsing_test.rb 

DEV

source ~/.bashrc
export LANG=en_US.UTF-8
rvm use 1.9.2 > /dev/null
rvm info | grep full_version
bundle install > /dev/null
bundle exec ruby parsing_test.rb 

Platform: 1.9.3

source ~/.bashrc
export LANG=en_US.UTF-8
rvm use 1.9.3 > /dev/null
rvm info | grep full_version
bundle install > /dev/null
bundle exec ruby parsing_test.rb 

Other benchmarks

Similar benchmark using other markup libraries

Markdown using Redcarpet in Ruby 1.8.7

source ~/.bashrc
rvm use 1.8.7 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_redcarpet" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_redcarpet" bundle exec ruby parsing_redcarpet_test.rb 

Markdown using Redcarpet in Ruby 1.9.2

source ~/.bashrc
rvm use 1.9.2 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_redcarpet" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_redcarpet" bundle exec ruby parsing_redcarpet_test.rb 

Markdown using Redcarpet in Ruby 1.9.3

source ~/.bashrc
rvm use 1.9.3 > /dev/null
rvm info | grep full_version
BUNDLE_GEMFILE="Gemfile_redcarpet" bundle install > /dev/null
BUNDLE_GEMFILE="Gemfile_redcarpet" bundle exec ruby parsing_redcarpet_test.rb 

Encoding benchmarks

Not setting default Encoding

Setting Encoding::UTF_8 as default

Setting Encoding::ASCII_8BIT as default