[MacRuby-devel] [MacRuby] #424: performance regression from ruby 1.8 and 1.9

MacRuby ruby-noreply at macosforge.org
Sun Nov 29 16:59:35 PST 2009


#424: performance regression from ruby 1.8 and 1.9
-------------------------------------+--------------------------------------
 Reporter:  jordan.breeding@…        |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  blocker                  |   Milestone:                       
Component:  MacRuby                  |    Keywords:                       
-------------------------------------+--------------------------------------

Comment(by jordan.breeding@…):

 So, I wrote a self contained group of tests to test the performance of two
 variants of swapping characters in strings, and test the performance of
 push/pop and pushObjects/pop in combination with inserting into a Set.

 The attachment is [attachment:performance_test.rb performance_test.rb]

 Results:

 Ruby 1.8
 {{{

 Test 001 -- String character swap, 2500000 times
 Test 001: 13.5609 seconds
 Overall: 19.4610 seconds


 Test 002 -- String character swap (alternate), 2500000 times
 Test 002: 8.5599 seconds
 Overall: 14.6769 seconds


 Test 003 and 004 -- Insert 500000 nodes into a priority queue using
 pop/push (003), plus Set calls (004)
 Test 003: 71.3116 seconds
 Test 004: 1.1641 seconds
 Overall: 73.5490 seconds


 Test 005 and 006 -- Insert 500000 nodes into a priority queue using
 pop/pushObjects (005), plus Set calls (006)
 Test 005: 77.3168 seconds
 Test 006: 1.0839 seconds
 Overall: 74.4669 seconds

 }}}

 Ruby 1.9
 {{{

 Test 001 -- String character swap, 2500000 times
 Test 001: 9.7238 seconds
 Overall: 14.9907 seconds


 Test 002 -- String character swap (alternate), 2500000 times
 Test 002: 8.4750 seconds
 Overall: 13.9169 seconds


 Test 003 and 004 -- Insert 500000 nodes into a priority queue using
 pop/push (003), plus Set calls (004)
 Test 003: 23.5861 seconds
 Test 004: 1.2312 seconds
 Overall: 27.4714 seconds


 Test 005 and 006 -- Insert 500000 nodes into a priority queue using
 pop/pushObjects (005), plus Set calls (006)
 Test 005: 22.4412 seconds
 Test 006: 1.1627 seconds
 Overall: 23.1751 seconds

 }}}

 MacRuby
 {{{

 Test 001 -- String character swap, 2500000 times
 Test 001: 27.9602 seconds
 Overall: 36.8786 seconds


 Test 002 -- String character swap (alternate), 2500000 times
 Test 002: 24.1841 seconds
 Overall: 32.5536 seconds


 Test 003 and 004 -- Insert 500000 nodes into a priority queue using
 pop/push (003), plus Set calls (004)
 Test 003: 22.8907 seconds
 Test 004: 2.4607 seconds
 Overall: 28.7985 seconds


 Test 005 and 006 -- Insert 500000 nodes into a priority queue using
 pop/pushObjects (005), plus Set calls (006)
 Test 005: 28.8811 seconds
 Test 006: 2.5541 seconds
 Overall: 27.3512 seconds

 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/424#comment:12>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list