[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: check performance with Benchmark

Li Chen

1/13/2007 11:31:00 AM


--- Jan Svitok <jan.svitok@gmail.com> wrote:
> Hi,
>
> 1. you can put the script in a method/function and
> call that.
> 2. use 10000.times { } ;-)
> either result = Benchmark.measure { 10000.times {
> script }}
> or result = 1..10000.map { Benchmark.measure {
> script }}


Jan,

Thank you for your cute idea and my script looks
better now.

Li



____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generi...