J
Jan Friedrich
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.methodlength)
benchmark 'code' do
m.call
end
benchmark 'send' do
string.sendlength)
end
benchmark 'eval' do
eval "string.length"
end
run 10_000
== CREDITS
Copyright 2008 by Jan Friedrich ([email protected])
== LICENSE
Ruby's license.
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.methodlength)
benchmark 'code' do
m.call
end
benchmark 'send' do
string.sendlength)
end
benchmark 'eval' do
eval "string.length"
end
run 10_000
== CREDITS
Copyright 2008 by Jan Friedrich ([email protected])
== LICENSE
Ruby's license.