[MacRuby] #1077: Performance of String
MacRuby
ruby-noreply at macosforge.org
Fri Dec 24 18:26:11 PST 2010
#1077: Performance of String
----------------------------------+-----------------------------------------
Reporter: yasuimao@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
The performance of the following script improved dramatically with r4964,
but the changes made on 12/17 seem to affect the performance again.
'''Script'''
{{{
freq = Hash.new(0)
10.times{File.read("test.txt").scan(/\w+/){|word| freq[word] += 1}}
}}}
'''File''': 1553 English words; times are all in seconds
MacRuby 0.9 nightly 2010/12/17
{{{
0.54 0.52 0.52
}}}
MacRuby 0.9 nightly 2010/12/24
{{{
34.42 34.55 34.50
}}}
Ruby 1.8.7
{{{
0.28 0.26 0.26
}}}
I ran the script 4 times and the first one was dropped to eliminate the
effect of MacRuby start-up time. My Mac is Mac mini C2D 2.0GHz.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1077>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list