Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
Apple Businesses

Experimental MacRuby Branch Is 3x Faster 191

Posted by kdawson
from the deep-red-cocoa dept.
An anonymous reader writes "Zen and the Art of Programming published an article about MacRuby's new experimental 0.5 branch (project blog entry here). According to the included benchmarks, Apple's version of Ruby could already, at this early stage of its development, be about three times as fast as the fastest Ruby implementation available elsewhere."
This discussion has been archived. No new comments can be posted.

Experimental MacRuby Branch Is 3x Faster

Comments Filter:
  • by Anonymous Coward on Sunday March 29, 2009 @04:13PM (#27381821)

    Why MacRuby Matters (Present & Future)?

    Apparently because an experimental incomplete version of Ruby is fast. Colour me unimpressed.

  • by NoTheory (580275) on Sunday March 29, 2009 @04:32PM (#27381945)
    MacRuby matters for a lot of reasons. Early benchmarks aren't one of them. http://blog.headius.com/2009/03/on-benchmarking.html [headius.com]

    MacRuby's potential for Cocoa integration is fantastic and great, and something i very very much want to see.

    It's not clear however what relationship benchmarks at this stage (with an incomplete implementation) will actually correspond to in the future. They are a total red herring for discussion.

    Look at MacRuby on the merits! not the benchmarks!
  • by Viol8 (599362) on Sunday March 29, 2009 @04:33PM (#27381955)

    "LLVM supports effective optimization at compile time, link-time (particularly interprocedural), run-time"

    Amazing, truly unique ideas. If only someone had thought of doing this 30 years ago... oh wait...

  • by Anonymous Coward on Sunday March 29, 2009 @04:42PM (#27382013)

    Not really, it's neat but hardly new. You want to see a renaissance in compilers, look at TraceMonkey, LuaJIT, V8 and whatever the WebKit engine is called this week.

  • by FooBarWidget (556006) on Sunday March 29, 2009 @04:51PM (#27382053)

    Every time a story is posted about Ruby performance improvements, someone will post something along the lines of "x times faster than super ultra duper slow is still slow". Even if Ruby is 1000 times faster, there will still be people complaining. My guess is that none of these people actually use Ruby in production to be able to tell how much interpreter performance actually matters in the grand scheme of things.

  • Re:Ruby? (Score:5, Insightful)

    by NoTheory (580275) on Sunday March 29, 2009 @04:58PM (#27382083)
    Er, way to troll? If you'd like to do your ridiculous hello world you can stick to:

    puts "i like beans"

    And it's really unclear what "it" you're referring to. Because Ruby, for me, is a good blend of the things i wanted from Perl and Lisp with a side of Object Orientation. I get all the laziness and conveniences of Perl, and i can do all the crazy stuff i'd want to do with Lisp. So imo, you're way off base.
  • Re:Ruby? (Score:3, Insightful)

    by anegg (1390659) on Sunday March 29, 2009 @05:52PM (#27382443)
    Any sort of layering is a major cause of bugs/slowdown? Quick, throw out TCP/IP. Everyone start using Ethernet frames directly from their apps, even if what you really want to use is SOAP over HTTP over SSL over TCP over IP... I'm not sure how you will get your Ethernet frames past the first router, but I'm sure you will think of something. Damn layering just gets in the way!
  • by Pinky's Brain (1158667) on Sunday March 29, 2009 @06:16PM (#27382633)

    They don't have any particular antipathy to the GPL ... Chriss Lattner proposed LLVM as a GCC successor after starting work at Apple. The FSF kicked him to the curb. I don't know if they underestimated his and Apple's commitment into turning the compiler into a true competitor or if they are simply stupid.

    As LLVM gets better GCC will lose developers, this is unavoidable, it's EGCS all over again ... but this time a merge doesn't seem on the cards. It wasn't LLVM but the FSF themselves who torpedoed one of the GPL flagships ... and for very very poor reasons.

  • by tyrione (134248) on Sunday March 29, 2009 @06:20PM (#27382663) Homepage

    Well, if you ask me, I suspect that someday in a future version of the Mac OS, Ruby will be a first-class language for application development alongside or perhaps replacing Objective-C. I think Apple likes Ruby and its aesthetic. A lot of the Rails devs are Mac developers, and I think that's where it sparked.

    First Class, maybe. Replacing ObjC? You're prediction makes LSD trips seem dull.

  • by Anonymous Coward on Sunday March 29, 2009 @06:22PM (#27382669)

    no.

  • Re:Ruby? (Score:2, Insightful)

    by rgravina (520410) on Sunday March 29, 2009 @06:30PM (#27382731)

    So you're suggesting that instead of creating languages like Ruby, we should create libraries to more complex environments like Java to make them faster to develop with? Variety is the spice of programming :). Personally, I'm glad languages like Python and Ruby exist and they are not only great and productive languages, they have both made me rethink the way I write software. I'm not sure just adding on top of Java would have achieved the same thing.

  • by Otterley (29945) on Sunday March 29, 2009 @06:42PM (#27382811)

    These days I'm writing exclusively in Ruby and it is "fast enough" (even with 1.8.X).

    I suspect that's because your website doesn't receive thousands of dynamic requests per second.

  • by Anonymous Coward on Sunday March 29, 2009 @07:02PM (#27382925)

    Whenever I read posts like these I start to wonder if I accidentally walked into a Starbucks.

    Yea, these Mac snobs need to get with the program. If they put half the effort they put into MacRuby into CocoOnPunchCards, perhaps the rest of us might take them a little more seriously.

  • by jcr (53032) <jcr.mac@com> on Sunday March 29, 2009 @07:39PM (#27383093) Journal

    Apple should be enormously grateful to the LLVM project.

    So should everyone else who's been living through the dark ages of GCC. The main effect of GCC for the last 20 years has been to suck all of the air out of the room for anyone else who wanted to develop compilers.

    -jcr

  • by jcr (53032) <jcr.mac@com> on Sunday March 29, 2009 @07:41PM (#27383111) Journal

    So, GCC is making what should be technical decisions on a political basis?

    Good to know. That's one more reason to be glad when GCC fades away.

    -jcr

  • just you wait... (Score:4, Insightful)

    by 3seas (184403) on Sunday March 29, 2009 @08:55PM (#27383535) Journal

    ... for them to get further along in completing it... it'll slow down.

  • by rmav (1149097) on Monday March 30, 2009 @02:05AM (#27385077)

    The main effect of GCC for the last 20 years has been to suck all of the air out of the room for anyone else who wanted to develop compilers.

    That is one of the most retarded statements I've ever read.

    No. What the poster said is true. Also unfair, because GCC is a very useful tool, but it still had a bad influence as well. GCC is extremely useful and produces decent code as well, but it has effectively stifled a lot of C/C++ compiler research. And it seems to become slower with each release. I have a lot of code that was faster with 2.95 than with any 3.x release, and with 4.x it is even slower.

    Now, LLVM is still a mixed bag, sometimes code is much faster, sometimes a bit slower, and does not compile everything I throw at it, but it is impressive technology. It has a more modern infrastructure, and finally allows things like compiling to bytecode and dynamic run-time optimisation with C. It may even allow for CPU-independent operating systems in the future, where you have LLVM bytecode in the binaries that will run like natively-compiled code once loaded.

    I compiled some C programs _to_ LLVM bytecode and then ran them on my mac.

    Their performance was comparable, oftentimes better, than that of the same programs compiled with a recent GCC. And I can still add inline assembler, which then is used only on the right architecture, if I provide C alternatives.

    Think about this. This has the potential of *finally* freeing us from dependence on a CPU ISA. It may be an Apple-sponsored project, but we all should be grateful to them that they are actually pushing it.

    Roberto

  • Re:Ruby? (Score:3, Insightful)

    by Serious Callers Only (1022605) on Monday March 30, 2009 @03:32AM (#27385479)

    Because puts { "I like beans" } is 9000% better than just typing I like beans.

    What a terrible example

    1. It's not functioning Ruby (try puts "I like beans", like most languages in fact)

    2. It has nothing to do with the strengths or failings of Ruby as a language.

    Do you know anything about Ruby? Do your empty platitudes about 'layers upon layers of complexity' actually have any basis in reality? From your comment, I suspect not.

    There are some not so nice corners of Ruby, but an attempt to oversimplify is not one of them.

  • by DECS (891519) on Monday March 30, 2009 @04:08AM (#27385647) Homepage Journal

    While that's certainly true, OSS also benefits a lot from Apple. Without Mac OS X, BSD would have 25 million fewer users exercising its code.

    Apple also owns CUPS and finances LLVM and WebKit and initiated Darwin Calendar Server and lots of other projects. Had the world not rejected NeXT and Unix to race after Microsoft's vaporware in the 90s, all the effort at reinventing BSD as Linux could have been united into a single OSS effort. So Apple has been working against the tide to return the world back to open, interoperable software.

    I think open interoperability is more important that forcing companies to propagate an ideology that only hardware should be marketable.

  • by Teilo (91279) on Monday March 30, 2009 @10:29AM (#27388845) Homepage

    I don't care much for Ruby myself. I'm a Python guy, but I don't give a frack what language people use.

    "Least used scripting language"? Right, because nobody develops on Rails (like it or hate it).

    Ever check the stats on Developers who use Macs (vs. the general populace)? Didn't think so.

    And finally: that which makes MacRuby very very fast can also make Ruby on *nix very very fast.

    The problem with Ruby is not the language. It is the VM. Improve the VM, and more people will look at other uses where Ruby is a great fit but for its speed.

"If truth is beauty, how come no one has their hair done in the library?" -- Lily Tomlin

Working...