Archive for the 'Ruby Benchmark Suite' Category

Ruby Shootout Status Update

Antonio Cangiano July 7th, 2008

I want to provide those who are waiting for the Ruby shootout with a heads up. The benchmark suite needs some substantial changes in order to ensure accuracy and fairness for all the VMs involved.

This will delay the execution (and reporting) of the shootout further, but it will be worth it. I definitely prefer a shootout that’s published later in July (or heck even August) that is realistic, fair and provides interesting metrics (e.g. CPU time and memory) over an inaccurate one that was put together in a rush just for the sake of publishing it tomorrow.

For those interested in the technical details, we are trying to separate the parsing and “compilation” of definitions from the actual execution of the code (which needs to be timed). I accomplished this by creating a Proc for each benchmark, and then tested the time spent executing its call method. The problem with this approach is that it penalizes VMs that don’t JIT procs, like JRuby for example.

We also thought about defining a method instead of a Proc, but eval won’t accept class definitions or constants within methods. The workaround would be using MyClass.class_eval instead of class MyClass in the benchmarks and Module#const_set for the constants (or changing them to instance variables, for example). But we’re shooting for a cleaner solution in which we divide definitions from their actual execution in separate files, and only time the latter.

And of course, we also need to add cross-platform memory measurement into the picture. It may take a while, but stay tuned. ;-)

This Week in Ruby (June 26, 2008)

Antonio Cangiano June 26th, 2008

This is the 11th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.

This edition begins with some bad news: Several vulnerabilities that affect the main Ruby implementation have been discovered. There is no reason to freak out, but they are serious. An ill-intended person could take advantage of these vulnerability and execute arbitrary code. Matasano has a few practical examples which illustrate the vulnerabilities in question. To learn more head over to the official advisory. Unfortunately, the suggested upgrades (except those for Ruby 1.8.7) are currently not working for many Rails developers, who’re reporting segmentation faults. The Phusion team has created a patch that was reported to be working, but it would be nice to see the Ruby Core Team verify and incorporate it quickly. If you’re running a version of Ruby that shipped with Mac OS X, don’t upgrade yet. Instead wait for Apple’s Software Update.

RubyGems 1.2 was released and it’s much more responsive than previous versions of it were (no more bulk updates just to install a new gem). To upgrade run: sudo gem update --system (without sudo if you are on Windows). After a substantial refactoring, Mocha 0.9 – a framework for mocking and stubbing – was released this week. A new BitNami RubyStack version was released (1.2 beta) as well, which adds a lot of goodies to the package, including but not limited to NGINX, Thin, Rack, EventMachine and so on. Speaking of EventMachine, check out EventMachine: Fast and Scalable Event-Driven I/O Framework published by InfoQ. Last week they also published an interview with yours truly, in regards to the Ruby Benchmark Suite. I regret that the shootout testing hasn’t started yet as promised, but Murphy’s law got in the way.

For those interested in improving their language-fu, there were a numbers of interesting articles: Using select, reject, collect, inject and detect, Enumerating Enumerable, Macros, Hygiene, and Call By Name in Ruby Eliminating code duplication with Metaprogramming. Also noteworthy, this piece on working with Microformats from Ruby.

A Ruby Community Announcements group was started in order to provide a fast ML for announcements only. It’s for those who’d like to stay in the loop, but wish to avoid the high volume of messages in Ruby-Talk.

The erubycon conference about Ruby and the Enterprise will be held between August 15 and 17 (‘08) in Columbus, Ohio. They still have a few seats available, so if this topic is of interest to you, grab a spot while you still can.

Finally, if you’re hiring Ruby talent or plan to look for a Ruby job any time soon, take a peek at these 15 fundamental questions for Ruby interviews. They’re somewhat basic, but the article is a good staring point nevertheless.

ALT.rb

From the world of alternative implementations and frameworks, I found this article on Rubinius FFI, an introduction to MacRuby as a replacement for RubyCocoa, and the announcement of Merb’s run_later” method for backgrounds tasks, all to be informative.


To keep the good times rolling, the second edition of This Week in Rails is available on the official Rails blog.

Heads up regarding the shootout

Antonio Cangiano June 23rd, 2008

Call it Murphy’s law if you will, but over the weekend my MacBook Pro’s charger cord developed a nasty rip (see photo). I tried electrical tape and other (potentially) “unsafe” measures, but to no avail. My laptop has no charge and is essentially dead. I’ve ordered a new MagSafe power adapter and it should be here in a few days (I hope).

This means that the shootout testing that was planned for tomorrow (the 24th), will have to wait just a few days. On the bright side, this should give you time to send us more benchmarks. :-P

Next »