The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
YARV bm tidbits

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Corvus Corvidae

Posts: 12
Nickname: corvidae
Registered: Feb, 2006

Corvus Corvidae is not dead
YARV bm tidbits Posted: Feb 17, 2006 12:53 AM
Reply to this message Reply

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

Topic: It's A Small Semantic World Previous Topic   Next Topic Topic: YARV Merged Matz

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use