>>>>> "A" == =?iso-8859-1?Q?Aleksi Niemel=E4?= <iso-8859-1> writes:

>> There is a *big* difference between 1.4.5 and 1.5.x for your example.

A> Great, good to know. I'll look it when I'll have some free time. Of course I
A> forgot to mention I'm using 1.4.5 :(.

 Just to give you an example (with -pg), with 24001.times do end

 1.4.5

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 51.79    217.22   217.22 502483359     0.00     0.00  rb_gc_mark
 23.73    316.74    99.52     1223    81.37    81.90  gc_sweep
 19.09    396.80    80.06 15649929     0.01     0.01  st_foreach
  2.84    408.72    11.92 249631513     0.00     0.00  mark_hashentry
  0.29    409.95     1.23   456070     0.00     0.21  rb_eval
  0.16    410.62     0.67 14686205     0.00     0.00  rb_mark_hash
 

 1.5.x

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 50.63    130.66   130.66 308766112     0.00     0.00  rb_gc_mark
 23.82    192.13    61.47      751    81.85    82.86  gc_sweep
 18.53    239.94    47.81  9633361     0.00     0.00  st_foreach
  2.90    247.43     7.49 153352522     0.00     0.00  mark_hashentry
  0.58    248.92     1.49   456070     0.00     0.03  rb_eval
  0.20    249.44     0.52   744031     0.00     0.05  ruby_re_match
  0.20    249.95     0.51  1152048     0.00     0.03  ruby_re_search
  


Guy Decoux