From: Mike Sassak Date: 2009-08-20T02:18:21+09:00 Subject: Re: Confirm my Performance Test Against Java? --001636ed6f6b0390d3047181d23c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Argh! That gist should be http://gist.github.com/170476. Sigh... On Wed, Aug 19, 2009 at 1:17 PM, Mike Sassak wrote: > On Wed, Aug 19, 2009 at 9:31 AM, Ben Christensen < > benjchristensen@gmail.com> wrote: > >> I'm evaluating Ruby for use in a variety of systems that are planned by >> default to be Java. >> >> I've started down a path of doing various performance tests to see what >> kind of impact will occur by using Ruby and in my first test the numbers >> are very poor - so poor that I have to question if I'm doing something >> wrong. >> >> I've tried it on both Linux and Mac OSX and get similar performance >> numbers on each - differences being hardware, but the ratio between the >> results about the same. >> >> Please take a look at my blog post on my test results and view the >> source code and let me know if I'm doing something completely wrong with >> the Ruby code or execution - or if these are accurate numbers. >> >> >> http://benjchristensen.com/2009/08/18/initial-impressions-on-ruby-performance/ >> >> NOTE: This is not an attempt to start a flame war. This is a legitimate >> effort to take a good look at Ruby and let the numbers speak for >> themselves in making decisions for what types of applications I can >> choose to use Ruby for without sacrificing the performance of a mature >> platform such as Java. >> > > Hi Ben, > > The point everyone keeps bringing up--whether this benchmark is indicative > of what you will actually be doing with Ruby, and whether it is "fast > enough"--is worth considering for any project, but the fact remains that for > many things, Java is going to execute faster than Ruby. You can certainly > optimize Ruby code (and yes, writing Ruby extensions in C is actually pretty > easy), but that's not why many of us love Ruby. We love it because it allows > you to turn FileReadParse.java into this: http://gist.github.com/170466. > Now, in the spirit of good fun: > > $ ruby file_read_parse_2.rb file_read_parse_2.rb > Starting to read file ... > The number of tokens is: 39. > It took 0.189 ms > > $ ruby file_read_parse_2.rb FileReadParse.java > Starting to read file ... > The number of tokens is: 159. > It took 0.215 ms > > See? :-) > > Good luck with Ruby, and don't be afraid to ask more questions! > Mike > > >> Thank you. >> >> Ben >> -- >> Posted via http://www.ruby-forum.com/. >> >> > --001636ed6f6b0390d3047181d23c--