News for hackers. Stuff that matters.
Re:Making your ruby fly by donw on Thursday November 22, 2012 @11:13AM (#4819170)
2x improvement in my 'rake spec' runtime... not bad!

If you're using rbenv, you can pass CFLAGS to it on the command line, like so: `CFLAGS='-O2' rbenv install ...`

Re:Making your ruby fly by josephlord on Thursday November 22, 2012 @11:25AM (#4819214)
Better than 2x for me adding '-O3':

  time bundle exec parallel_rspec spec/
  ...
  778 examples, 0 failures, 28 pendings
Before - OS X (2.4GHz Core Duo 2):

  Took 319.461302 seconds
  real	5m26.322s
  user	6m16.837s
  sys	0m7.062s
After - OS X (2.4GHz Core Duo 2):

  Took 123.58472 seconds
  real	2m7.208s
  user	2m19.427s
  sys	0m5.414s
Before - Ubuntu (1.8GHz AMD Phenom quad core)

  Took 247.467126561 seconds
  real	4m8.867s
  user	9m41.552s
  sys	0m6.188s
After - Ubuntu (1.8GHz AMD Phenom quad core)

  Took 90.244449901 seconds
  real	1m32.865s
  user	3m41.434s
  sys	0m6.136s
Re:Making your ruby fly by cheald on Thursday November 22, 2012 @07:52PM (#4820592)
Is that just with the CFLAGS, or did you include the Falcon patches?
Re:Making your ruby fly by josephlord on Thursday November 22, 2012 @08:53PM (#4820693)
CFLAGS (-O3) only!

Nearly factor of 3 improvement.

I think I'll repost this link next week when more people are in work mode. It could save a lot of time and CPU cycles for a lot of people. It's a shame the default isn't better (not sure if it is RVM issue or the Ruby package itself or if I can configure a user/system default build config).

Re:Making your ruby fly by cheald on Friday November 23, 2012 @03:12PM (#4823496)
Wow, that's impressive. My results weren't nearly as good - maybe 5-8% or so, but I'm at ~5.4s load time on an app that takes almost 30 sec on vanilla MRI, so that's not too bad.

It is indeed a shame the defaults aren't better. I wonder if there's a reason that it's not default. If not, maybe a pull request is warranted.

Re:Making your ruby fly by hieronymusN on Thursday November 22, 2012 @12:22PM (#4819398)
For a better understanding of CFLAGs in general: http://www.gentoo.org/doc/en/gcc-optimization.xml
Re:Making your ruby fly by ksec on Thursday November 22, 2012 @10:13AM (#4818982)
That is 6x improvement in speed. Why cant some of these become default?
Re:Making your ruby fly by alisnic on Thursday November 22, 2012 @10:34AM (#4819036)
Please note that this difference is only in this scenario (rake routes), it largely varies in other ones.

Also, a big part of falcon patch is the ruby 2.0 garbage collector, which obviously will be available in ruby 2.0.

Re:Making your ruby fly by boundlessdreamz on Thursday November 22, 2012 @10:29AM (#4819021)
IIRR Falcon patches improve 'require' speed which is significant only when you boot up. I think some variation of it will be in 2.0
Re:Making your ruby fly by base on Thursday November 22, 2012 @02:38PM (#4819776)
Anyone knows the CFlags for EC2 instances?
Re:Making your ruby fly by gazd on Thursday November 22, 2012 @01:09PM (#4819531)
for rvm

`rvm install ruby-1.9.3-p286 --patch falcon -n falcon`