Posted on Apr 24, 2008

Contributions, speedup and less quirks for us

Well, lot of things happened in the past weeks. Work on getting One-Click RubyInstaller with MinGW out of the door, RubySpecs and of lot of satisfaction.

Please keep reading for the good part of this post…

We are not alone, and we have clear goals!

I can no longer say I’m the only insane one working with Ruby on Windows ;-)
Jokes apart, please welcome Gordon Thiesfeld who noticed a few important glitches of MRI (more on that later). He also did some work in the wiki to
reflect our status and Roadmap. Thank you Gordon!

Right now we have small but clear goals, we will keep focused on those.

A community more interested in support Ruby on Windows

Following the butterfly effect of RubyInside post, a few projects shown interest about adding support — or at least — play nice with Windows.

Thanks goes to Sam Smoot, David Leal, Dan Kubb and Martin Kihlgren (sorry, couldn’t find a good link to add).

The good news is that DataObjects (DO), the low level layer that powers the ORM DataMapper soon will be available for Windows (as for their 0.9.0 release).

In other news, Jeff Davis from ruby-pg followed our Integration Request idea and filled in so we can work together making development and release of binaries for Ruby PostgreSQL work for all of us.

These projects give us the opportunity to play with Git on Windows, so a discussion was raised in the mailing list to determine our DVCS for RubyInstaller.

Less quirks for us.

Vista

David Leal was having some issues getting the Sandbox working under Vista. Turns out it was Not Our Fault™, but some glitches of the changes introduced in Vista and MinGW.

John E. from MinGW project released an update and we updated the recipes to use these files instead.

system(‘gem’) vs system(‘gem.bat’)

Was annoying needed to patch every Rakefile or Ruby script that called gem or rake or any other tool installed via RubyGems. Turns out that wasn’t a Windows fault, but some faulty logic in the Windows version of Ruby when dealing with system() calls.

Thanks to Nobuyoshi Nakada, 1.8 branch includes this fix, which solves a few things we discussed on rubyinstaller-devel mailing list to ease the need of tweaking the environment for MinGW.

Rubinius, RubySpecs, and speed.

After the huge quantity of problems 1.8.7 preview release introduced for MinGW build of Ruby. I decided will be good get RubySpecs (part of Rubinius project) working on MRI on Windows.

Thanks to Brian Ford (brixen), he introduced a few changes into MSpec (the RSpec-like tool used in Rubinius) that now let us focus on the specs of Ruby.

Since I wanted to avoid break the great rubinius 0/0 reports, I setup coLinux running Ubuntu and installed Ruby to have 4 environments to test everything under the same machine:

  • MRI 1.8.6-p114 (i386-mswin32) (Windows with VC6)
  • MRI 1.8.6-p114 (i386-mingw32) (Windows with GCC 3.4.5)
  • MRI 1.8.6-p144 (i686-linux) (Linux with GCC 4.1.2)
  • RBX 1.8.6 compatible (i686-pc-linux-gnu) (Rubinius, Linux with GCC 4.1.2)

Wow, lot of configurations, don’t you think? :-P

Just for sake of testing, now that I’m on it, used the old sudoku solver to evaluate how fast these interpreters will go1:

Interpreter Average (secs.) Speedup
i386-mswin32 13.112 1 (reference)
i386-mingw32 8.875 1.48
i686-linux 8.808 1.49
i686-pc-linux-gnu 7.218 1.82

Nice, keeping in consideration that both MRI and Rubinius are running inside coLinux, which is Linux on top of Windows kernel.

Also is nice to see Rubinius got better: from 88 seconds to current results [2].

1 Look at this pastie for the raw numbers.

2 Previous results here

13 Comments

  • Thanks for the mention, Luis. I’ll try to keep up!

  • sgwong says:

    Great work. Looking forward for the release of the installer for MinGW. I am using the developer version with the msys, but need some simple installer for easier distribution to other ppl. The problem for now is I might need to create the installer for ruby-gnome myself, the old ruby-gnome installer is compile with VC6, not sure it can use with the MinGW ruby or not.

  • Luis says:

    MinGW and VC6 builds are compatible in theory. Reality proven to be quite different sometimes.

    I think there are a few instructions about building Ruby-GNOME with MinGW here

    Maybe is not up-to-date, but can work.

    I think also the wxRuby guys did a guide or walk through about this too, but cannot be sure (memory is not what it used to be).

  • Brian says:

    Thanks Luis for doing so much to improve the RubySpecs and Ruby.

  • Luis says:

    Hey Brian!

    Didn’t did so much! and I saw tmp() give you some headaches! (I think Windows is not the only platform with annoyances) ;-)

  • Random bits and Experiments…

    Last month was pretty intense (at least for me), Rubinius, RubySpec, mixed setups and some benchmarks made it a good month. That was 30 days ago, this time I don’t have too much to comment, but please keep reading.
    more>
    Again, less quirks f…

  • Park Heesob says:

    I tried with same VC6 and diffirent OPTFLAGS.

    with default O2b2xg
    Average (secs.) : 20.278

    with -Ox
    Average (secs.) : 14.909

    It is possible there is more fast OPTFLAGS.

  • Luis says:

    @Park: Thank you for the info.

    I can extrapolate then that VC6 build, with proper flags can achieve the same amount of efficiency than MinGW.

    Keep in mind that I didn’t played with flags for any of the versions, just used what Average Joe Ruby will use.

    Will try to find a window of free time to check this and update the post.

    Thanks again.

  • roger says:

    I think the comparison with rubinius on Linux might be slightly unfair, given the different platforms [i.e. some of its speedup might be the OS] :)
    Now building rubinius on windows and comparing it–that would be cool :)
    Thanks again!
    -=R

  • Luis says:

    Actually, the comparison was pretty fair. I’ve run both MRI and Rubinius inside the coLinux installation.

    You can extrapolate those numbers to Windows too, but that was not the goal.

    As you can see, MRI inside coLinux is even faster than MRI native in the same machine.

  • roger says:

    inside a virtualbox [compiled with pthread] I get 22s, windows native 12.5
    Ok that’s not helpful, but hey :)
    -=R

  • [...] This is completely unscientific test, and is on the same format than previous one [...]

  • roger says:

    Is it all right if I include the sudoku in the ruby benchmark suite?