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

MacRuby ruby-noreply at macosforge.org
Tue Nov 10 20:16:40 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@…):

 Another interesting data point: The stripped down test that just generates
 and inserts X number of nodes and pops some along the way (to generate new
 nodes) always runs incredibly fast when using the CFBinaryHeap version of
 the script:

 {{{
 54 jordan at thetourist ~/priority_queue_bug > for LOOP in
 *_{125,187,218,250}.cocoa; do eval time macruby "${LOOP}"; done
 macruby speed_test_125.cocoa  3.45s user 0.17s system 145% cpu 2.495 total
 macruby speed_test_187.cocoa  4.97s user 0.22s system 150% cpu 3.457 total
 macruby speed_test_218.cocoa  5.92s user 0.26s system 152% cpu 4.060 total
 macruby speed_test_250.cocoa  6.85s user 0.29s system 153% cpu 4.657 total
 }}}

 When running the pure ruby version it is slower, and periodically can even
 be slower than ruby and ruby1.9, which are both fairly consistent, even
 with large data sets (250,000 items):

 {{{
 ruby speed_test_250.pqueue  81.52s user 2.80s system 99% cpu 1:24.36 total
 ruby speed_test_250.pqueue  81.48s user 2.82s system 99% cpu 1:24.40 total
 ruby speed_test_250.pqueue  81.77s user 3.03s system 99% cpu 1:24.86 total
 ruby speed_test_250.pqueue  81.51s user 2.89s system 99% cpu 1:24.44 total
 }}}

 while the MacRuby version tends to fluctuate, especially with large data
 sets, the interesting part is that when it is slower with large data sets
 it is using a decent amount of memory (at least according to iStat Menus),
 and not as much CPU, possibly an issue with garbage collection?

 {{{
 macruby speed_test_250.pqueue  76.62s user 9.61s system 160% cpu 53.618
 total
 macruby speed_test_250.pqueue  78.58s user 9.93s system 159% cpu 55.512
 total
 macruby speed_test_250.pqueue  82.74s user 13.04s system 98% cpu 1:36.89
 total
 macruby speed_test_250.pqueue  78.36s user 11.76s system 58% cpu 2:33.71
 total
 }}}

 The _125 variant generates 125000 nodes, _187 generates 187500 nodes, _218
 generates 218750 nodes, 250 generates 250000 nodes.

 MacRuby tends to perform more slowly with large data sets with several
 applications open, but not doing anything (they are taking up memory, but
 not CPU). In the same scenario the timings for ruby and ruby1.9 are still
 consistent and ruby1.9 still performs quickly.

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



More information about the MacRuby-devel mailing list