Listen friend, this isn't what Ruby is good at.<p>Acquire a C program, a C-Assembler program if possible and drive it from Ruby with an API.<p>Don't do mad cranking with Ruby.
This is <i>exactly</i> why our company is using a combination of JRuby and Java. There's some big "infrastructure" bits (like search) that really are better done in Java, and it's wonderful to be able to leverage that while still using nice terse Ruby for the majority of our code.<p>There are those that prefer to use MRI or YARV with C, and more power to 'em. However, I'm getting too old and lazy to spend all my time chasing down memory bugs.
<i>My takeaway from the project is that Ruby is a great language hampered by a terrible execution environment.</i><p>He has a problem with execution speed and blames the tool instead of using the correct tool for the job. I could probably hammer a nail in with the back of a screwdriver but it would be better to learn how to use the hammer. Sigh. Call C from ruby/python/any interpreted language if you NEED speed.