tag:blogger.com,1999:blog-24599054.post979195001088202569..comments2024-02-07T00:23:34.835-07:00Comments on On Ruby: Benchmarking Makes it Bettergnupatehttp://www.blogger.com/profile/10492341480170667775noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-24599054.post-42295772296558713152009-04-14T00:35:00.000-07:002009-04-14T00:35:00.000-07:00Very Nice postVery Nice postweb design companyhttp://www.vijayinfo.innoreply@blogger.comtag:blogger.com,1999:blog-24599054.post-90554637128719245402008-12-06T12:56:00.000-07:002008-12-06T12:56:00.000-07:00Hey, in fact more fair bench would be:require 'ben...Hey, in fact more fair bench would be:<BR/><BR/>require 'benchmark'<BR/>n = 5_000_000<BR/>Benchmark.bm(15) do |x|<BR/> x.report("for loop:") { a=0; for i in 1..n; a = "1"; end }<BR/> x.report("times:") { a=0; n.times do ; a = "1"; end }<BR/> x.report("upto:") { a=0; 1.upto(n) do ; a = "1"; end }<BR/>end<BR/><BR/>unless it is Ruby1.9funny_falconhttps://www.blogger.com/profile/07247716942015581766noreply@blogger.com