Either an I/O or a range performance issue
------------------------------------------

                 Key: JRUBY-3001
                 URL: http://jira.codehaus.org/browse/JRUBY-3001
             Project: JRuby
          Issue Type: Bug
          Components: Performance
         Environment: Jruby 1.1.1 to 1.1.4, any OS (Linux, MacOS/X, Windows 
XP), and JVM (1.5/1.6), multiple memory (1G to 4G RAM) and cpu configs (1 to 4 
processors, Intel/AMD/PPC) and a multitude or JVM settings (-client/-server, 
+Xms/+Xmx variations, ParallelGC on/off, etc.)
            Reporter: Mike Hoskins
            Priority: Minor


Thanks for a wonderful Ruby implementation.  How do you get so much done in so 
little time?  You guys are amazing!

The fact that performance issues (compared to MRI Ruby) are called bugs is 
amazing!

Unfortunately, these source code snippets are all slower on jruby (and with 
jruby-ng) -

Any size of range (slower whether small or large):
  puts (1..10000).to_a
  puts (1..100000).to_a
  puts (1..1000000).to_a

Or iterated versions of above:
  (1..10000).each { |i| puts i  }
  (1..100000).each { |i| puts i  }
  (1..1000000).each { |i| puts i  }

Even if I remove the puts, it's still far slower (these are about 5-10 times 
slower in Jruby 1.1.4 using JDK 1.6.than MRI Ruby 1.8.6):
  (1..1000000).each { }   # Jruby 1.1.4 - 3.3 seconds; MRI Ruby 1.8.6 - 0.3 
seconds
  (1..1000000).to_a         # Jruby 1.1.4 - 5.9 seconds; MRI Ruby 1.8.6 - 1.0 
seconds
  (1..10000000).each { } # Jruby 1.1.4 - 7.9 seconds; MRI Ruby 1.8.6 - 1.2 
seconds
  (1..10000000).to_a       # this one seems to cause the JVM to eat memory 
(won't fit in 256M JVM),  but the MRI Ruby version only takes a 8.6 seconds to 
run (Jruby didn't finish in 7 minutes due to memory issues)

I don't know if it's the range or something in the iterators, something in the 
JVM, etc.

Now, for the microbenchmarks with numbers (above), I do know that part of it is 
the Jruby 1.1.4 startup time.  However, this is consistent with Jruby-ng 
(1.1.4) and without NailGun.  (NailGun brings the smaller microbenchmarks more 
in line with MRI, but AFAIK, it's only due to startup time; the longer runs 
aren't improved much).

It does this with puts or without, it does it in Windows XP, MacOS/X (Leopard), 
and Linux, with JVM 1.5 and 1.6, across Jruby 1.1.1 to 1.1.4, on 1 or more 
processors, puts with or without output being redirected to a file, in -client 
or -server mode, with or without Parallel GC, etc.  It even is slower in 
multiple consecutive runs in irb and jirb, where the startup time is minimized.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to