macruby? rubinius

29 views
Skip to first unread message

rogerdpack

unread,
Feb 3, 2010, 12:32:59 PM2/3/10
to Ruby Benchmark Suite
I noticed that rubinius has gotten some pretty good looking benchmarks
[1]

I wonder how it compares with macruby (except, not having a mac, I'm
not the one that can do the benchmark :) )

Anybody up for it? Does macruby run rails/sinatra?

-rp

[1] http://www.infoq.com/news/2010/01/ruby-vm-roundup-rubinius-dtrace

Antonio Cangiano

unread,
Feb 3, 2010, 12:45:03 PM2/3/10
to ruby-bench...@googlegroups.com
On Wed, Feb 3, 2010 at 12:32 PM, rogerdpack <rogerp...@gmail.com> wrote:
I wonder how it compares with macruby (except, not having a mac, I'm
not the one that can do the benchmark :) )

Anybody up for it?

I plan to run a new shootout soon (in February). What are the requirements for the rdoc and rails benchmarks you introduced? I think those should be documented within the README.

Cheers,
Antonio
--
http://ThinkCode.TV - Screencast e videocorsi di programmazione
http://antoniocangiano.com - Zen and the Art of Programming
http://math-blog.com - Mathematics is wonderful!
Follow me on Twitter: http://twitter.com/acangiano
Author of "Ruby on Rails for Microsoft Developers" (Wrox, 2009)

Roger Pack

unread,
Feb 3, 2010, 12:48:50 PM2/3/10
to ruby-bench...@googlegroups.com
> I plan to run a new shootout soon (in February). What are the requirements
> for the rdoc and rails benchmarks you introduced? I think those should be
> documented within the README.

There's a (second) README buried in the rails folder--I can move it
into main. The rdoc benchmark "should" run as is on any platform,
being only ruby.

-r

Antonio Cangiano

unread,
Feb 3, 2010, 12:58:37 PM2/3/10
to ruby-bench...@googlegroups.com
On Wed, Feb 3, 2010 at 12:48 PM, Roger Pack <roger...@gmail.com> wrote:
There's a (second) README buried in the rails folder--I can move it
into main.

No need to. Could you tell me however which gems are required to pass the tests?

Roger Pack

unread,
Feb 3, 2010, 1:26:44 PM2/3/10
to ruby-bench...@googlegroups.com
> No need to. Could you tell me however which gems are required to pass the
> tests?

Hmm. I think there was a README once but I don't see it now anywhere.
Maybe got lost in one of the refactors.

Anyway here's the list for MRI

gem install mysql
gem install RedCloth
gem install fastercsv
gem install mime-types
gem install mini_magick
gem install ezcrypto

I will probably get around to updating it for jruby sometime, which
would add activerecord-jdbcmysql-adapter and possibly some others.
I "guess" rubinius would be the same as MRI, but haven't tried it.

-r

Antonio Cangiano

unread,
Feb 3, 2010, 1:32:08 PM2/3/10
to ruby-bench...@googlegroups.com
On Wed, Feb 3, 2010 at 1:26 PM, Roger Pack <roger...@gmail.com> wrote:

Anyway here's the list for MRI

gem install mysql
gem install RedCloth
gem install fastercsv
gem install mime-types
gem install mini_magick
gem install ezcrypto

With such a long list, I'm afraid most implementations won't be able to run the benchmarks. For this shootout, I may have to skip the Rails benchmarks.

Roger Pack

unread,
Feb 3, 2010, 1:49:09 PM2/3/10
to ruby-bench...@googlegroups.com
>> gem install mysql
>> gem install RedCloth
>> gem install fastercsv
>> gem install mime-types
>> gem install mini_magick
>> gem install ezcrypto
>
> With such a long list, I'm afraid most implementations won't be able to run
> the benchmarks. For this shootout, I may have to skip the Rails benchmarks.

Let's see...RedCloth has a pure ruby version, fastercsv, mime-types,
mini_magick and ezcrypto are all pure ruby, if that helps any.
-=r

Shri Borde

unread,
Feb 3, 2010, 2:09:23 PM2/3/10
to ruby-bench...@googlegroups.com
I was able to run IronRuby, but the following changes:

1. Stub out any calls to "gem foo" and "require foo" for the gems since most are not needed in the code paths exercised by the benchmarks. Only RedCloth is actually exercised. Ofcourse, you could argue that the benchmarks are simplistic since they are not currently exercising all parts of the Rails app - they mainly just request the root page, or just talk directly with the database via ActiveRecord. Instead, they should simulate a real workload.

2. Stub out the one use of RedCloth which converts markdown to html, and just return the markdown. The webpage look ugly, but does not matter for the benchmarks.

3. Modify database.yml to use SQLServer or SQLite3 since there is no MySQL adapter for IronRuby yet, and it was easier for me to configure SQLite3 even for MRI.

4. Modify schema.rb (I think) to remove MySQLisms. For example, SQLite does not allow multiple indexes (even across different tables) to have the same name.

I am OOF now, but can send the patch later for your reference.

--
The GitHub project is located at http://github.com/acangiano/ruby-benchmark-suite

You received this message because you are subscribed to the Google
Groups "Ruby Benchmark Suite" group.
To post to this group, send email to
ruby-bench...@googlegroups.com
To unsubscribe from this group, send email to
ruby-benchmark-s...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-benchmark-suite?hl=en

Shri Borde

unread,
Feb 5, 2010, 1:23:07 AM2/5/10
to ruby-bench...@googlegroups.com
Attached is the patch I had used to run the Rails benchmark with MRI+SQLite3 and IronRuby+SQLServer. Its not cleaned up, but should give you a feel for the changes that are needed. All the changes map to the items described below.
rails_rbs.patch

rogerdpack

unread,
Feb 5, 2010, 8:04:57 PM2/5/10
to Ruby Benchmark Suite
> Attached is the patch I had used to run the Rails benchmark with MRI+SQLite3 and IronRuby+SQLServer. Its not cleaned up, but should give you a feel for the changes that are needed. All the changes map to the items described below.

Maybe somebody can give you write access, too
(github username shri)

Antonio Cangiano

unread,
Feb 5, 2010, 8:17:48 PM2/5/10
to ruby-bench...@googlegroups.com
On Fri, Feb 5, 2010 at 8:04 PM, rogerdpack <rogerp...@gmail.com> wrote:
Maybe somebody can give you write access, too

Done. :)

Shri Borde

unread,
Feb 7, 2010, 3:33:48 AM2/7/10
to ruby-bench...@googlegroups.com
I have sent pull requests before for some other changes, and I can start pushing them myself. For the Rails benchmark though, my patch was good enough to get quick and dirty numbers but it needs some thinking of what the right approach is overall. I am effectively breaking the app by removing the calls to the "gem" function, and stubbing out the call to RedCloth. Is that the right thing to do, etc etc?
 

From: ruby-bench...@googlegroups.com [ruby-bench...@googlegroups.com] on behalf of Antonio Cangiano [acan...@gmail.com]
Sent: Friday, February 05, 2010 5:17 PM
To: ruby-bench...@googlegroups.com
Subject: Re: [RBS] Re: macruby? rubinius

Roger Pack

unread,
Feb 8, 2010, 8:35:34 AM2/8/10
to ruby-bench...@googlegroups.com
> I have sent pull requests before for some other changes, and I can start
> pushing them myself. For the Rails benchmark though, my patch was good
> enough to get quick and dirty numbers but it needs some thinking of what the
> right approach is overall. I am effectively breaking the app by removing the
> calls to the "gem" function, and stubbing out the call to RedCloth. Is that
> the right thing to do, etc etc?

Well...if it makes it easier to test then we might as well stub them all out :)

Another option would be to "bundle" a pure ruby RedCloth, like 3.0.4

-r

Antonio Cangiano

unread,
Feb 8, 2010, 12:06:54 PM2/8/10
to ruby-bench...@googlegroups.com
Well...if it makes it easier to test then we might as well stub them all out :)
 
+1
 
Another option would be to "bundle" a pure ruby RedCloth, like 3.0.4

I like this approach. The implementations should be tested against ruby code, not whether they provide a given library in their own gem system.

Monty Williams

unread,
Feb 9, 2010, 5:20:30 PM2/9/10
to ruby-bench...@googlegroups.com
+1 from me too.

-- Monty


----- Original Message -----
From: "Antonio Cangiano" <acan...@gmail.com>
To: ruby-bench...@googlegroups.com
Sent: Monday, February 8, 2010 9:06:54 AM GMT -08:00 US/Canada Pacific
Subject: Re: [RBS] Re: macruby? rubinius


Reply all
Reply to author
Forward
0 new messages