[MacRuby] #1408: MacRuby is slow when passed a Regexp's object into argument of method.
#1408: MacRuby is slow when passed a Regexp's object into argument of method. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'benchmark' def scan(pattern) end Benchmark.bm(10) do |x| reg = Regexp.new(".") str = "." x.report "regexp" do scan(reg) end x.report "string" do scan(str) end end }}} Result: {{{ $ macruby t.rb user system total real regexp 0.000000 0.000000 0.000000 ( 0.001560) string 0.000000 0.000000 0.000000 ( 0.000008) $ ruby19 -v t.rb ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0] user system total real regexp 0.000000 0.000000 0.000000 ( 0.000010) string 0.000000 0.000000 0.000000 ( 0.000005) $ ruby -v t.rb ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0] user system total real regexp 0.000000 0.000000 0.000000 ( 0.000009) string 0.000000 0.000000 0.000000 ( 0.000006) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1408> MacRuby <http://macruby.org/>
#1408: MacRuby is slow when passed a Regexp's object into argument of method. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@…): If I use a "VM_OPT_LEVEL=0", it seems faster. but, MacRuby is still slow. {{{ $ VM_OPT_LEVEL=0 macruby t.rb user system total real regexp 0.000000 0.000000 0.000000 ( 0.000716) string 0.000000 0.000000 0.000000 ( 0.000009) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1408#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby