From: Trans Date: 2008-06-12T05:51:59+09:00 Subject: Re: Bench 1.0.0 released On Jun 10, 3:34 pm, Jan Friedrich wrote: > Bench version 1.0.0 released!http://bench.rubyforge.org > > == DESCRIPTION > > Do you remeber how to use the benchmark library from the Ruby standard > lib? I don't. > > Now you need not to remember, there is Bench: A DSL around the benchmark > lib of the Ruby > standard lib with the goal to make benchmarking as easy as possible. > > == SYNOPSIS > > Adapted example of the benchmark documentation from the pickaxe version 2 > page 657 > >   require 'bench' > >   string = 'Stormy Weather' >   m = string.method(:length) > >   benchmark 'code' do >     m.call >   end > >   benchmark 'send' do >     string.send(:length) >   end > >   benchmark 'eval' do >     eval "string.length" >   end > >   run 10_000 What is the underlying translation of benchmark? I.e. the original Benchmark library has a few different methods, which did you use? I like the simplicity of your DSL. In the long run it might be nice to see this advance beyond a dependency on the original benchmark library. T.