Corvus Corvidae
Posts: 12
Nickname: corvidae
Registered: Feb, 2006
Corvus Corvidae is not dead
|
|
|
|
YARV bm tidbits
|
Posted: Feb 17, 2006 12:53 AM
|
|
This post originated from an RSS feed registered with Ruby Buzz
by Corvus Corvidae.
|
Original Post: YARV bm tidbits
Feed Title: corvidae_rb
Feed URL: http://corvidae-rb.livejournal.com/data/rss
Feed Description: corvidae_rb - LiveJournal.com
|
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Corvus Corvidae
Latest Posts From corvidae_rb
|
|
Advertisement
|
Parallel versus simple assignments in current ruby-1.8.4 and in ruby-1.9.0 with yarv-0.3.3:
$ cat bm_ass.rb
require 'benchmark'
N = 1000000
Benchmark.bm(8) do |x|
x.report('simple') {N.times {a = 1; b = 2; c = 3}}
x.report('parallel') {N.times {a, b, c = 1, 2, 3}}
end
$ ruby -v
ruby 1.8.4 (2006-02-01) [i686-linux]
$ ./yarv -v
ruby 1.9.0 (2005-11-18) [i686-linux]
YARVCore 0.3.3 (rev: 366) [opts: ]
$ ruby bm_ass.rb
user system total real
simple 4.450000 0.000000 4.450000 ( 4.487715)
parallel 7.500000 0.000000 7.500000 ( 7.494179)
$ ./yarv -I ../yarv/lib/ bm_ass.rb
user system total real
simple 1.820000 0.390000 2.210000 ( 2.236806)
parallel 1.870000 0.380000 2.250000 ( 2.263452)
I've been finding many interesting (and usually encouraging) benchmarks with yarv -- I'll try to post a few on a regular basis.
Read: YARV bm tidbits
|
|