What happened was, I got a note from Matt (who runs the ongoing server), saying my traffic had suddenly jumped (to like 230G/month) and wondering why. I had no idea, so I whipped up a little Ruby script to break down traffic by resource and host and time-of-day and so on. Then I wondered which version of Ruby would run it fastest?

Ruby 1.8.659.658.80.8
Ruby 1.959.958.80.8
JRuby 1.1b62.563.41.3
JRuby trunk43.544.51.0

Details · This is on a 2GHz Intel MacBook running Leopard. The Ruby is the one that comes with the Mac, the 1.9 was built from svn on 12/17. JRuby 1.1b and the build from trunk were both run with -J-server. I tried to run Rubinius but it wouldn’t build from today’s tarball.

The data is a week’s worth of ongoing logfile ending on December 9th; 222,755,573 bytes in 1,029,073 lines.

The code is just a quick answer-me-this-question hack; I didn’t think about it, I just banged it out. Shows the effects of me having been a Perl user for a decade or more: log.rb, stats.rb.


Comment feed for ongoing:Comments feed

From: Charles Oliver Nutter (Dec 19 2007, at 01:38)

The improvement between JRuby 1.1b1 and trunk is almost entirely due to Marcin Mielczynski's amazing port of Oniguruma to the JVM. For the first time we have a real byte[]-based regex engine, which means JRuby regex performance just got a huge boost. There have also been other perf enhancements, but these numbers are probably about where we'll be for a JRuby 1.1 final release next month.


author · Dad · software · colophon · rights
picture of the day
December 18, 2007
· Technology (77 fragments)
· · Ruby (93 more)

By .

I am an employee
of Amazon.com, but
the opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.