From: Colin Bartlett Date: 2010-06-03T12:44:25+09:00 Subject: Re: A better way to write this function? --0016e68ddeaeca3d0b048817ebda Content-Type: text/plain; charset=ISO-8859-1 On Fri, May 28, 2010 at 4:20 PM, Jason Lillywhite < jason.lillywhite@gmail.com> wrote: > Here is my attempt at Newton's second law in Ruby: > ... > What if I needed more speed but still wanted it in Ruby? > Using C for the "fast" bits has been suggested. As an alternative to C for speed, I've found that using JRuby with parts of the code as Java functions works well. Perhaps I ought to add that I've never tried compiling a C program and integrating it with Ruby, because of my lack of knowledge of the finer - and not so finer! - points of C compilation and integration with Ruby. But I've found writing and compiling parts of the code that need to be fast fairly easy in Java, and integration of Java with JRuby is also fairly straightforward. --0016e68ddeaeca3d0b048817ebda--