Hi Yes, I've tried it, and it works fine. I don't have any timing info on this, though.
/O ----- Original Message ----- From: Charles O Nutter <[EMAIL PROTECTED]> Date: Sunday, June 11, 2006 9:21 pm Subject: Re: [Jruby-devel] New StringIO. To: [EMAIL PROTECTED], jruby-devel@lists.sourceforge.net > Excellent! Tried it with RubyGems yet? > > On 6/11/06, Ola Bini <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > So, I've been spending some time implementing a pure Java StringIO > > (which this time actually passes the test cases... =) > > > > I also did a little timing test, with operations taken directly > from the > > pick axe. > > I did these 10_000 times for the old and the new implementations: > > sio = StringIO.new("time flies like an arrow") > > sio.read(5) > > sio.read(5) > > sio.pos = 18 > > sio.read(5) > > sio.rewind > > sio.write("fruit") > > sio.pos=16 > > sio.write("a banana") > > sio.rewind > > sio.read > > > > And got this output: > > Doing the operations with old StringIO 10000 times took 6409.0 milli > > seconds > > Doing the operations with new StringIO 10000 times took 791.0 milli > > seconds > > > > Which looks good, about 8 times increase. Should be welcome in some > > places, neh? > > > > The files attached are two classes, org.jruby.RubyStringIO, and > > org.jruby.libraries.StringIOLibrary, and a patch for org.jruby.Ruby > > > > Regards > > Ola Bini > > > > > > > > > > _______________________________________________ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > > > > > > > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com > _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel