[Rubyinstaller-devel] Migrate to GCC as soon as possible?

Roger Pack rogerpack2005 at gmail.com
Wed Nov 26 09:22:50 EST 2008

Ruby has traditionally been "slighted" on windows [1].  For whatever reasons :)
You'll notice that mingw is [at least for more] quite a step up in
speed from the msvc version.

That build error you described is one I ran into, too--Luis has
promised to fix it once a newer version of rubygems comes out :)

I'm also glad to hear that jruby is fast on windows--hardly anybody
has probably even tested it out :)

Another interesting test would be 1.9 versus jruby on windows:
It does build--at least it should :P [every so often the core guys
commit something that causes a build problem--hopefully they're not
there :P ]

Note also that building it on mingw is easily 10x easier, using Luis'
installer, than it used to be.  Trust me.  Just trust me.

Note also that if you wanted a 'tidge' more performance, you could try
to use GCC 4.2.x or what not [and enable the gentoo flags :) ].  The
rubyinstaller doesn't use it because it's still kind of edgey, but
apparently it is slightly faster.  So things will improve that way.

I'd be interested in running "benchmarks not from jruby" against them all, too.

In general, though--I don't see it as a "competition" or "problem" to
have ruby running with a backend vm on .net or java--the nicety of
writing ruby is that [hopefully] you never have to touch code in the
lower level, so...it should just work, so which ever is faster, it
won't hurt you to use it.  Just my $0.02.

[1] http://www.rubyinside.com/is-windows-a-first-class-platform-for-ruby-823.html
On Wed, Nov 26, 2008 at 12:39 AM, Joao Pedrosa <joaopedrosa at gmail.com> wrote:
> Hi guys,
> First of all, thanks for working on this installer which is much
> appreciated. :-)
> It was how I first installed Ruby for instance. :-)
> But for a long-time I have also been running Ruby on Linux and left Windows
> by itself since then. Every now and then I could be seen testing Ruby
> on Windows though, and this is such an occasion.
> Today I was testing these versions of Ruby:
> ruby -v
> ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
> C:\t_\downloads\rubyinstaller\sandbox\ruby_mingw\bin\ruby -v
> ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-mingw32]
> jruby -v
> jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-26 rev ) [x86-java]
> When building the MinGW Ruby I used git to download the rubyinstaller
> scripts and ran it with rake. When it got to the Rubygems part it returned
> an error during the "ruby setup.rb [...] c:/path/c:/doubling_path" or something.
> I was able to install the Rubygems by running the setup manually for it, though
> I am not sure what else I missed from the remaining of the installation scripts.
> To test the different Ruby versions, I ran some JRuby benchmark files with each
> interpreter to make a rough comparison. JRuby came faster by a good margin,
> though JRuby has different setups itself (--client, --server, -X-C)
> which influence
> the results. In general though, JRuby has closed the gap and generally surpassed
> MRI's performance. Second faster came the MinGW Ruby I just built. Only in
> third and last came the original OneClick installed Ruby which uses VC6 right?
> You can run the benchmarks I ran and see for yourself:
> http://svn.codehaus.org/jruby/trunk/jruby/bench/language/bench_colon.rb
> http://svn.codehaus.org/jruby/trunk/jruby/bench/bench_regex.rb
> They have a bunch of other benchmarks though:
> http://svn.codehaus.org/jruby/trunk/jruby/bench/
> JRuby could "just work" on unfriendly environments such as Windows while
> it has been a pain in the neck all these years to fully support Ruby on
> Windows. To top it all, JRuby could run considerably faster than Ruby on
> Windows in special.
> I have barely used JRuby at all thus far, and it's not a perfect
> replacement for
> Ruby just yet. For example, JRuby can have a hard time presenting more
> friendly error messages which really tell what went wrong, but it's evolving,
> improving, and it "steals" the platform infrastructure from Java so
> they can focus
> on other issues. Also, when testing GUI applications (GTK+), Ruby runs
> instantly while JRuby with Swing can take a while longer, though they could
> improve it as well. JRuby generally starts slower with more complex
> applications,
> is that fair to say? :-)
> I came to Ruby from Java and a disillusionment with the .NET surge and the
> splitting of the developers into worlds. Ruby was meant to be the third way,
> but now Java and .NET more than promise to support Ruby. Also, Java and .NET
> try to leave the C/C++ world behind for as much as most developers are
> concerned.
> As I currently see it, instead of having Ruby by itself, the future will bring
> Ruby + Java and Ruby + .NET and we will have to deal with that and it will
> be a nice problem to have. :-)
> See an example of IronRuby:
> http://www.valleyhighlands.com/ttc/post/IronRuby-for-the-Newbie.aspx
> What worries me is Ruby having its ass kicked by these other implementations
> mainly on Windows. I personally think it's just easier to run JRuby on Windows
> and in the name of reaching a consensus, JRuby could win as my preferred
> platform, at least until Microsoft adopts the GNU tools or .NET + Mono
> with IronRuby give Java and JRuby something to worry about.
> I guess Ruby on Windows will need to take advantage of the latest improvements
> on compilers and whatnot to keep it competitive. If Microsoft's C compiler
> builds faster executables it could be better to use it, though MinGW's GCC
> could be "fast enough" and even more compatible.
> It's high-time something great happens to Ruby on Windows, other than
> Java and .NET. :-)
> I invite you to run some of the benchmarks found in the JRuby repository.
> JRuby can be run in different ways:
> # generally opts for a simpler JVM said to be the "client" one:
> jruby bench_colon.rb
> # found only in the JDK, this one can more aggressively try to optimize:
> jruby --server bench_colon.rb
> # disables the ruby to bytecode compiler because the interpreter is
> fast already:
> jruby --server -X-C bench_colon.rb
> And compare "stuff".
> I extended myself a lot in this post but I continue to be thoroughly thankful
> for the work of you guys.
> Cheers,
> Joao
> _______________________________________________
> Rubyinstaller-devel mailing list
> Rubyinstaller-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubyinstaller-devel


More information about the Rubyinstaller-devel mailing list