[MacRuby] #1048: Performance of Hash with an Array as a key

MacRuby ruby-noreply at macosforge.org
Thu Jan 6 19:19:45 PST 2011


#1048: Performance of Hash with an Array as a key
----------------------------------+-----------------------------------------
 Reporter:  yasuimao@…            |        Owner:  lsansonetti@…        
     Type:  defect                |       Status:  reopened             
 Priority:  blocker               |    Milestone:                       
Component:  MacRuby               |   Resolution:                       
 Keywords:                        |  
----------------------------------+-----------------------------------------

Comment(by yasuimao@…):

 I used a different machine, so the numbers are different from the previous
 posts, but here's the results of the tests.  I ran the test sequentially
 this time rather than running the test one by one, so the results might
 have been affected, yet it looks like force_encoding("UTF-16BE") does fix
 the problem.  Still, MacRuby is much slower than CRuby, exp. 1.9.2.

 {{{
 MacRuby 0.9 2011/01/06
 n               1       2       3
 1 F rep - Str   28.43    28.84   28.09
 1 F rep - Ary   27.82    28.39   28.23
 10 F - Str      27.10    26.08   25.55
 10 F - Ary      28.68    32.55   37.19
 18 F - Str      54.21    53.66   53.97
 18 F - Ary      68.74   104.04  117.75

 MacRuby 0.9 2011/01/06 - force_encoding
 n               1       2       3
 1 F rep - Str   0.59    0.75    0.86
 1 F rep - Ary   0.47    0.56    0.57
 10 F - Str      0.72    0.78    0.87
 10 F - Ary      1.02    1.38    1.41
 18 F - Str      1.45    1.58    1.86
 18 F - Ary      3.35    6.21    6.08

 MacRuby 0.9 2010/12/17
 n               1       2       3
 1 F rep - Str    1.30    1.51    1.75
 1 F rep - Ary    1.21    1.58    1.99
 10 F - Str       1.55    1.62    1.81
 10 F - Ary       5.18    9.73   13.91
 18 F - Str       3.33    3.18    3.42
 18 F - Ary      14.86   49.34   75.62

 MacRuby 0.9 2010/12/17 - force_encoding
 n               1       2       3
 1 F rep - Str   0.52    0.63    0.64
 1 F rep - Ary   0.45    0.53    0.53
 10 F - Str      0.66    0.68    0.74
 10 F - Ary      1.04    1.43    1.45
 18 F - Str      1.32    1.48    1.62
 18 F - Ary      3.58    5.42    6.30

 CRuby 1.8.7
 n               1       2       3
 1 F rep - Str   0.38    0.61    0.92
 1 F rep - Ary   0.51    0.83    0.93
 10 F - Str      0.56    0.72    0.90
 10 F - Ary      0.51    0.70    0.82
 18 F - Str      1.12    1.39    1.75
 18 F - Ary      1.34    1.64    1.67

 CRuby 1.9.2
 n               1       2       3
 1 F rep - Str   0.22    0.26    0.31
 1 F rep - Ary   0.43    0.47    0.52
 10 F - Str      0.28    0.30    0.30
 10 F - Ary      0.42    0.42    0.44
 18 F - Str      0.52    0.62    0.64
 18 F - Ary      0.86    0.88    0.90
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1048#comment:8>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list