From: Joe Van Dyk Date: 2005-08-29T16:20:04+09:00 Subject: Re: Benchmark question ruby 1.8.2, compiled on Redhat 9. On 8/27/05, Mohit Muthanna wrote: > > What version of Ruby are you on? > > > > Here's what I see: > > > > mohit@reddwarf log $ irb > > irb(main):001:0> require 'benchmark' > > => true > > irb(main):002:0> Benchmark.measure{ 1000000.times{ |i| i + 1 } } > > => # > @real=0.589663028717041, @utime=0.59, @cstime=0.0, @total=0.59> > > irb(main):004:0> quit > > mohit@reddwarf log $ ruby -v > > ruby 1.8.2 (2004-12-25) [i686-linux] > > mohit@reddwarf log $ > > > > Real time on my results are also lower than user time. But this may be > > a floating-point precision thing. > > > > I think your version of Benchmark is expressing "real time" in > > seconds, and the others in centi-seconds. > > > > Mohit. > > > > On 8/26/05, Joe Van Dyk wrote: > > > irb(main):015:0> Benchmark.measure { 1000000.times { |i| i + 1 } } > > > => > > > # > > @real=0.514808893203735, @utime=4.95, @cstime=0.0, @total=4.95> > > > > > > Why is user time bigger than real time? I'm confused by the > > > relationship between these numbers. > > > > > > > > > > > > -- > > Mohit Muthanna [mohit (at) muthanna (uhuh) com] > > "There are 10 types of people. Those who understand binary, and those > > who don't." > > > > > -- > Mohit Muthanna [mohit (at) muthanna (uhuh) com] > "There are 10 types of people. Those who understand binary, and those > who don't." > >