Start It Up: Improving JRuby's Startup Time

Hello friends! How long has it been? Too long! This post marks the beginning of a return to blogging about JRuby, the JVM, and everything in between. Today we’ll cover a topic that never gets old: JRuby’s startup performance.
Read More
2019-09-18 16:09:00 +0000

Running JRuby on the Graal JIT

Hello, friends! Long time no blog!
I'm still here hacking away on JRuby for the benefit of Rubyists everywhere, usually slogging through compatibility fixes and new Ruby features. However with the release of JRuby 9.2, we've caught up to Ruby 2.5 (the current release) and I'm spending a little time...
Read More
2018-07-03 21:45:00 +0000 2014!

I'm thrilled to announce that we'll have another edition of this year!
Last year's event was a great success. We had a two-day conference in Berlin immediately before Eurucamp 2013, with two speakers from the core team (myself and Tom Enebo) and a whopping fifteen non-core speakers. A great event was...
Read More
2014-05-21 17:44:00 +0000

The Pain of Broken Subprocess Management on JDK

I prefer to write happy posts...I really do. But tonight I'm completely defeated by the JDK's implementation of subprocess launching, and I need to tell the world why.
JRuby has always strived to mimic MRI's behavior as much as possible, which in many cases has meant we need to route...
Read More
2013-06-07 08:58:00 +0000

On Languages, VMs, Optimization, and the Way of the World

I shouldn't be up this late, but I've been doing lots of thinking and exploring tonight.
In studying various VMs over the past few years, I've come up with a list of do's and don't that make things optimize right. These apply to languages, the structures that back them, and...
Read More
2013-05-11 10:05:00 +0000

Constant and Global Optimization in JRuby 1.7.1 and 1.7.2

With every JRuby release, there's always at least a handful of optimizations. They range from tiny improvements in the compiler to perf-aware rewrites of core class methods, but they're almost always driven by real-world cases.
In JRuby 1.7.1 and 1.7.2, I made several improvements to the performance of Ruby constants...
Read More
2013-01-05 16:47:00 +0000

Refining Ruby

What does the following code do?
If you answered "it upcases two strings and adds them together, returning the result" you might be wrong because of a new Ruby feature called "refinements"...
Read More
2012-11-19 14:38:00 +0000

So You Want To Optimize Ruby

I was recently asked for a list of "hard problems" a Ruby implementation really needs to solve before reporting benchmark numbers. You know...the sort of problems that might invalidate early perf numbers because they impact how you optimize Ruby. This post is a rework of my response...I hope you find...
Read More
2012-10-15 18:26:00 +0000

Explanation of Warnings From MRI's Test Suite

JRuby has, for some time now, run the same test suite as MRI (C Ruby, Matz's Ruby). Because not all tests pass, we use minitest-excludes to mask out the failures, and over time we unmask stuff as we fix it.
However, there's a number of warnings we get from the...
Read More
2012-09-26 21:03:00 +0000

An experiment in static compilation of Ruby: FASTRUBY!

While at GoGaRuCo this weekend, I finally made good on an experiment I had been thinking about for a while: a static compiler for Ruby. I thought I'd share it with you good people today.
First we have a simple Ruby script with a class in it:...
Read More
2012-09-17 04:36:00 +0000

Avoiding Hash Lookups in a Ruby Implementation

I had an interesting realization tonight: I'm terrified of hash tables. Specifically, my work on JRuby (and even more directly, my work optimizing JRuby) has made me terrified to ever consider using a hash table in the hot path of any program or piece of code if there's any possibility...
Read More
2012-09-04 08:00:00 +0000

Invokedynamic in JRuby: Constant Lookup

This is the first of a set (not a series...there's no particular order) of articles I'll write on how JRuby is using invokedynamic. Hopefully they will show Rubyists how drastically invokedynamic is going to improve JRuby, and show other JVM language folks how to use invokedynamic effectively.
Hello friends!...
Read More
2011-08-10 18:00:00 +0000

JRuby and Java 7: What to Expect

Java 7 has landed, with a modest set of new features and a few major improvements as well. What can you expect from JRuby running on Java 7?
What's In Java 7The biggest changes in Java 7 are not related to the Java language at all. Sure, there's the "project...
Read More
2011-08-02 17:27:00 +0000

Next July, Last Friday, This Tuesday

So after months of not blogging anything technical, I'm going to blog something non-technical. Hopefully tech posts will pick up soon once my new baby boy Elliott is a bit older and less needy :)
When Is "This Friday"?...
Read More
2011-07-21 21:17:00 +0000

Differing java.util.regex.Matcher Unmatched Group Results on Android

Android is really an amazing little platform, but occasionally you will run into API differences. Some of these are actual bugs (like a number of reflection and enum issues in early releases), and others are just weakly-specified APIs.
Today, I worked on JRUBY-5541: Problem with java_import on Android (Ruboto)...
Read More
2011-03-07 19:05:00 +0000

Working Around the Java Double.parseDouble Bug

You may have seen recently that Java suffers from a similar floating-point parsing bug to the one that recently affected PHP users. The basic gist of it is that for this special 64-bit floating point value, the Java call Double.parseDouble("2.2250738585072012e-308") will get stuck in an infinite loop. Read the link...
Read More
2011-02-02 18:14:00 +0000

JRuby on Rails on Amazon Elastic Beanstalk

Amazon this week announced Elastic Beanstalk, a managed Apache Tomcat service for AWS. Naturally, I had to try JRuby on it.
First, the bad:AWSEB is really slow to deploy stuff. Several times it got "stuck" and I waited for more than 30 minutes for it to recover. It did not...
Read More
2011-01-19 20:31:00 +0000

Representing Non-Unicode Text on the JVM

JRuby is an implementation of Ruby, and in order to achieve the high level of compatibility we boast we've had to put in some extra work. Probably the biggest area is in management of String data.
Strings in Ruby 1.8...
Read More
2011-01-06 00:04:00 +0000