[MacRuby] #1088: Performance: String#* is very slow.

MacRuby ruby-noreply at macosforge.org
Thu Dec 30 00:45:22 PST 2010


#1088: Performance: String#* is very slow.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 require 'benchmark'

 n = 500000
 Benchmark.bmbm do |x|
   x.report { str = "a" * n }
 end
 }}}

 Result:
 {{{
 $ ruby -v tc.rb
 ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
 Rehearsal ------------------------------------
    0.010000   0.000000   0.010000 (  0.007391)
 --------------------------- total: 0.010000sec

        user     system      total        real
    0.000000   0.000000   0.000000 (  0.006874)

 $ ruby19 -v tc.rb
 ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]
 Rehearsal ------------------------------------
    0.000000   0.000000   0.000000 (  0.000698)
 --------------------------- total: 0.000000sec

        user     system      total        real
    0.000000   0.000000   0.000000 (  0.000161)

 $ macruby tc.rb
 Rehearsal ------------------------------------
   22.850000   9.470000  32.320000 ( 17.096490)
 -------------------------- total: 32.320000sec

        user     system      total        real
   22.910000   9.860000  32.770000 ( 17.328623)
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1088>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list