Notice it gets much worse with rails loaded. Anyone got a fix, or know
why this is happening?

cg5[20:55] development > ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
cg5[20:51] development > irb
irb(main):001:0> require 'benchmark'
=> true
irb(main):002:0> n = 5000
=> 5000
irb(main):003:0> m1 = Module.new
=> #<Module:0x5d6c54>
irb(main):004:0> module M2; end
=> nil
irb(main):005:0> Benchmark.bm do |x|
irb(main):006:1*   x.report { n.times do m1.name end }
irb(main):007:1>   x.report { n.times do M2.name end }
irb(main):008:1> end
      user     system      total        real
  1.710000   0.050000   1.760000 (  2.807539)
  0.010000   0.000000   0.010000 (  0.005157)
=> true
irb(main):009:0> ^Dcg5[20:51] development > script/console
Loading development environment (Rails 2.0.2)
>> require 'benchmark'
=> []
>> n = 5000
=> 5000
>> m1 = Module.new
=> #<Module:0x205c308>
>> module M2; end
=> nil
>> Benchmark.bm do |x|
?>   x.report { n.times do m1.name end }
>>   x.report { n.times do M2.name end }
>> end
      user     system      total        real
 14.120000   0.630000  14.750000 ( 28.017196)
  0.000000   0.000000   0.000000 (  0.010137)
=> true
>> 
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to