Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

What is this?

This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

What I need?

  • rbenv
  • ruby-build
  • autoconf

How do I use it?

curl https://raw.github.com/gist/3126141/rbenv.sh | sh
before_install_package() {
local package_name="$1"
if [[ "$package_name" == *ruby-1.9.3-p194* ]]; then
{
curl https://raw.github.com/gist/2593385/perf_and_gc.diff | patch -p1
} >&4 2>&1
fi
}
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
install_package "ruby-1.9.3-p194" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz" autoconf standard
VERSION="1.9.3-p194"
curl https://raw.github.com/gist/3126141/$VERSION-patched.sh > /tmp/$VERSION-perf
CC=/usr/bin/clang rbenv install /tmp/$VERSION-perf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment