Performance regression with Calling Java collection method with Ruby notation -----------------------------------------------------------------------------
Key: JRUBY-6006 URL: https://jira.codehaus.org/browse/JRUBY-6006 Project: JRuby Issue Type: Bug Components: Performance Affects Versions: JRuby 1.6.3 Environment: JDK 1.6 update 7 Windows XP Reporter: Peter K Chan There appears to be a significant performance regression between 1.5.6 and 1.6.0 on using Ruby notation to call Java collection method. Test case: {code} require 'java' require 'benchmark' puts Benchmark.measure { x = java.util.HashMap.new 5000.times { |n| true ? x[n.to_s] = 'y' : x.put(n.to_s, 'y') } } {code} Performance: {quote} C:\work>jruby -v foo.rb jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (Java HotSpot(TM) Client VM 1.6.0_07) [x86-java] 0.140000 0.000000 0.140000 ( 0.125000) C:\work>jruby -v foo.rb jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM) Client VM 1.6.0_07) [Windows XP-x86-java] 8.594000 0.000000 8.594000 ( 8.578000) C:\work>jruby -v foo.rb jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.6.0_07) [Windows XP-x86-java] 9.031000 0.000000 9.031000 ( 8.984000) {quote} -- This message is automatically generated by JIRA. 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