Skip to content

Instantly share code, notes, and snippets.

@oinak
Created November 22, 2012 19:53
Show Gist options
  • Save oinak/4132695 to your computer and use it in GitHub Desktop.
Save oinak/4132695 to your computer and use it in GitHub Desktop.
ruby performance change after rvm compile optimization
fer@hecate ~ $ echo "rvm_configure_env=(CFLAGS=-O3)" > ~/.rvmrc
fer@hecate ~ $ time ruby -e "count = 0; while(count < 100000000); count = count + 1; end; puts count"
100000000
real 0m6.324s
user 0m6.146s
sys 0m0.004s
fer@hecate ~ $ rvm reinstall ruby-1.9.3-head
(...)
fer@hecate ~ $ time ruby -e "count = 0; while(count < 100000000); count = count + 1; end; puts count"
100000000
real 0m2.730s
user 0m2.718s
sys 0m0.007s
fer@hecate ~ $ rvm use ree-1.8.7-2012.02
Using /home/fer/.rvm/gems/ree-1.8.7-2012.02
fer@hecate ~ $ time ruby -e "count = 0; while(count < 100000000); count = count + 1; end; puts count"
100000000
real 0m23.993s
user 0m23.955s
sys 0m0.002s
fer@hecate ~ $ rvm reinstall ree-1.8.7-2012.02
(...)
fer@hecate ~ $ time ruby -e "count = 0; while(count < 100000000); count = count + 1; end; puts count"
100000000
real 0m23.934s
user 0m23.897s
sys 0m0.002s
@oinak
Copy link
Author

oinak commented Nov 22, 2012

1.8 improved some more after "rvm get head"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment