[MacRuby] #1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2.
#1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. --------------------------------+------------------------------------------- Reporter: cyberfox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: performance regex --------------------------------+------------------------------------------- Here's the timings for a relatively simple program. (Caveat: Yes, it's using regular expressions to parse HTML; it's a stop- gap until I can make Nokogiri work with MacRuby in an app bundle. The point, however, is that partitioning, or some other operation done by this code, is somehow a _lot_ slower in MacRuby.) The outputs are as follows: {{{ $ rvm system --verbose Now using system ruby. $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] $ ruby parse_html.rb Just partitioning took: 0.0182089805603027 Number of partitioned splits: 2400 $ rvm 1.9.2 --verbose Using /Users/mrs/.rvm/gems/ruby-1.9.2-p136 $ ruby parse_html.rb Just partitioning took: 0.033324480056762695 Number of partitioned splits: 2400 $ macruby parse_html.rb Just partitioning took: 1.19672107696533 Number of partitioned splits: 2400 $ macruby --version MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] }}} Attached is a zip file with the HTML being parsed, and the tiny Ruby program that's doing it. -- Ticket URL: <http://www.macruby.org/trac/ticket/1140> MacRuby <http://macruby.org/>
#1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. --------------------------------+------------------------------------------- Reporter: cyberfox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: performance regex --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * milestone: MacRuby 0.9 => MacRuby 1.0 Comment: Thanks for the report, we will investigate. Regarding your Nokogiri-in- app-bundle issue, you may be interested in following #1137. -- Ticket URL: <http://www.macruby.org/trac/ticket/1140#comment:1> MacRuby <http://macruby.org/>
#1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. --------------------------------+------------------------------------------- Reporter: cyberfox@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: performance regex --------------------------------+------------------------------------------- Comment(by lsansonetti@…): So the problem here is that String#partition with a regexp that seems to be slow. -- Ticket URL: <http://www.macruby.org/trac/ticket/1140#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby