From: Jan Svitok Date: 2007-01-13T18:59:57+09:00 Subject: Re: check performance with Benchmark On 1/13/07, chen li wrote: > Hi all, > > I know I can use this format to check the performance > of my sctipt: > > result= Benchmark.measure{##script included here##} > > But this code will look ugly if the script spans many > lines.I wonder 1) if there is a better means and 2) > what if I want to check the same script for 10000 > times. 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 }}