[MacRuby] #348: macruby is slower than ruby 1.9 for priority queue work
#348: macruby is slower than ruby 1.9 for priority queue work -------------------------------------+-------------------------------------- Reporter: jordan.breeding@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- I was originally trying to debug why a program I have that uses priority queues was breaking under MacRuby. I am still in the process of tracking that one down (to a reproducible, small test case). In the process however I ended up with two different pure ruby priority queues that I was using, and one Obj-C based priority queue. To further track down the problem I pulled out some of the code into a much smaller example. Unfortunately, this actually worked for all three cases reliably and I could not reproduce the crash. Fortunately it uncovered some cases where ruby 1.9 reliably performs better than MacRuby. I do not know if these cases are known or not, but I am including the timing information inline here as well as in text files in the zip file I am attaching. using a small set with pqueue {{{ (; ruby1.9 ./small_queue_test.pqueue > /dev/null; ) 11.63s user 0.05s system 99% cpu 11.691 total (; macruby ./small_queue_test.pqueue > /dev/null; ) 16.49s user 1.34s system 107% cpu 16.509 total }}} using a larger set with pqueue {{{ (; ruby1.9 ./small_queue_test.pqueue > /dev/null; ) 186.19s user 1.20s system 93% cpu 3:21.24 total (; macruby ./small_queue_test.pqueue > /dev/null; ) 219.19s user 17.70s system 105% cpu 3:45.16 total }}} using a small set with ruby_priority_queue {{{ (; ruby1.9 ./small_queue_test.ruby_priority_queue > /dev/null; ) 20.28s user 0.10s system 97% cpu 20.899 total (; macruby ./small_queue_test.ruby_priority_queue > /dev/null; ) 37.43s user 2.05s system 107% cpu 36.717 total }}} using a larger set with ruby_priority_queue {{{ (; ruby1.9 ./small_queue_test.ruby_priority_queue > /dev/null; ) 230.49s user 0.93s system 99% cpu 3:51.97 total (; macruby ./small_queue_test.ruby_priority_queue > /dev/null; ) 482.74s user 25.98s system 105% cpu 8:00.51 total }}} In the two files "small_queue_test.pqueue" and "small_queue_test.ruby_priority_queue" there is a variable at the top that controls the starting level for the nodes, a higher number means a larger set. The small set was run with a starting node of 9, and the larger set was run with a starting node of 10. -- Ticket URL: <http://www.macruby.org/trac/ticket/348> MacRuby <http://macruby.org/>
#348: macruby is slower than ruby 1.9 for priority queue work -------------------------------------+-------------------------------------- Reporter: jordan.breeding@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by jordan.breeding@…): Since there was a big change in MacRuby last night I thought I would upload fresh timings, and this time I also made sure that nothing else was going on on the machine at all during the timings. small run: {{{ (; ruby1.9 ./small_queue_test.pqueue > /dev/null; ) 11.76s user 0.05s system 99% cpu 11.830 total (; ruby1.9 ./small_queue_test.ruby_priority_queue > /dev/null; ) 20.45s user 0.10s system 99% cpu 20.567 total (; macruby ./small_queue_test.pqueue > /dev/null; ) 16.14s user 1.37s system 107% cpu 16.240 total (; macruby ./small_queue_test.ruby_priority_queue > /dev/null; ) 39.24s user 2.13s system 107% cpu 38.481 total }}} large run: {{{ (; ruby1.9 ./small_queue_test.pqueue > /dev/null; ) 121.44s user 0.47s system 99% cpu 2:02.09 total (; ruby1.9 ./small_queue_test.ruby_priority_queue > /dev/null; ) 245.53s user 1.14s system 99% cpu 4:07.63 total (; macruby ./small_queue_test.pqueue > /dev/null; ) 201.46s user 16.89s system 106% cpu 3:25.21 total (; macruby ./small_queue_test.ruby_priority_queue > /dev/null; ) 482.99s user 25.50s system 106% cpu 7:55.70 total }}} This is on a Core 2 Duo 2.0 with 4 GB of RAM installed (but it only uses 3). -- Ticket URL: <http://www.macruby.org/trac/ticket/348#comment:1> MacRuby <http://macruby.org/>
#348: macruby is slower than ruby 1.9 for priority queue work -------------------------------------+-------------------------------------- Reporter: jordan.breeding@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by jordan.breeding@…): #424 supersedes this one -- Ticket URL: <http://www.macruby.org/trac/ticket/348#comment:2> MacRuby <http://macruby.org/>
#348: macruby is slower than ruby 1.9 for priority queue work -------------------------------------+-------------------------------------- Reporter: jordan.breeding@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: duplicate Keywords: | -------------------------------------+-------------------------------------- Changes (by mattaimonetti@…): * status: new => closed * resolution: => duplicate -- Ticket URL: <http://www.macruby.org/trac/ticket/348#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby