Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: gc-check-perfo…

May 12, 2012

  1. Ryo Onodera

    Improve concurrency performance by cache locality

    There is a bottle neck in SharedState::check_gc_p. It is called from all Ruby
    threads and always writes to memory. That invalidates CPU cache and thus,
    everything is slowed down.
    
    Actually writing isn't necessary in this case. It is only when the gc flag is
    set. And that situation is unlikely.
    
    This commit removes the bottle neck by avoiding writing. So that, each CPU core
    runs at their full speed, not hampered by slow memory fetching due to cache
    invalidation.
    
    check_gc_p is heavily called under concurrently-executed tight loops (happen
    sometime in the real word, are excised often by people interested in Rubinius's
    promised concurrency)
    
    After this commit, each concurrent thread executes specially synthesized test
    code as roughly fast as a single thread. This doesn't tell that  Rubinius
    executes Ruby code purely proportional to the number of CPU cores. However it
    does that Rubinius runs its vm and has a potential to run Ruby code at the
    speed.
    
    Hello true concurrency :)
    
    I measured performance as follows.
    
    BEFORE THIS COMMIT:
    1 thread:
    2.225222 seconds for looping 100000000 times
    2.22639 seconds for looping 100000000 times
    2.223919 seconds for looping 100000000 times
    2.231417 seconds for looping 100000000 times
    
    2 threads:
    4.393776 seconds for looping 100000000 times
    4.284649 seconds for looping 100000000 times
    4.347468 seconds for looping 100000000 times
    4.279089 seconds for looping 100000000 times
    
    AFTER THIS COMMIT:
    1 thread:
    2.052846 seconds for looping 100000000 times
    2.054754 seconds for looping 100000000 times
    2.066346 seconds for looping 100000000 times
    2.071744 seconds for looping 100000000 times
    
    2 threads:
    2.243053 seconds for looping 100000000 times
    2.274827 seconds for looping 100000000 times
    2.24769 seconds for looping 100000000 times
    2.270161 seconds for looping 100000000 times
    
    TEST CODE:
    loop_count = 100_000_000
    threads = 2
    threads.times.collect do
      Thread.new do
        loop do
          time = Time.now
          i = loop_count
          i -= 1 until i.zero?
          puts "#{Thread.current}: #{Time.now - time} seconds for looping " +
               "#{loop_count} times"
        end
      end
    end.each(&:join)
    authored
  2. Ryo Onodera

    Improve GlobalCache's cache locality

    authored Ryo Onodera committed
  3. Brian Shirai

    Install pre-installed gems after installing rbx.

    authored
  4. Brian Shirai

    Installed pre-installed gems with rubygems. Fixes #1712

    authored
  5. Brian Shirai

    Added pre-installed gems as .gem files.

    authored
  6. Brian Shirai

    Removed pre-installed gem source directories.

    authored

May 11, 2012

  1. Ryo Onodera

    Define ALLOCA_STACKVARIABLES like ALLOCA_CALLFRAME

    authored
  2. Ryo Onodera

    Use inspected major and minor for easier investigation

    authored
  3. Ryo Onodera

    Remove trailing white spaces

    authored
  4. Ryo Onodera

    Remove unused macro: USE_JUMP_TABLE

    authored
  5. Aviv Ben-Yosef

    Merge pull request #1714 from dubek/time_with_rational_offest_for_19

    Time accepts a Rational offset
    authored

May 10, 2012

  1. Ryo Onodera

    Use stack_clear in pop_many not inefficient loop

    authored
  2. Dov Murik

    Time utc_offset can be Rational

    authored
  3. Dov Murik

    add spec for Time#utc_offset for Rational offsets

    authored

May 09, 2012

  1. Miguel Herranz

    Fix Zlib::ZStream#closed? & #ended?

    authored
  2. Dirkjan Bussink

    Remove unused CApiHandle builtin

    authored
  3. Arthur Schreiber

    Merge pull request #1711 from r-stu31/spec_splat_orarray

    Add a test case for a splat of 'obj || []'.
  4. r-stu31

    Tag failing splat spec.

    authored
  5. r-stu31

    Add a test case for a splat of 'obj || []'. This is currently failing…

    … under Rubinius.
    authored rudolf committed

May 08, 2012

  1. Jesse Cooke

    Merge pull request #1709 from troessner/master

    BasicObject includes itself in its list of constants.
    authored
  2. Jesse Cooke

    Hex letters should be downcased

    This came up when fixing a bug in MagLev
    MagLev/maglev@78e9025
    authored
  3. Timo Rößner

    Remove `fails` tag for "BasicObject includes itself in its list of co…

    …nstants".
    authored
  4. Timo Rößner

    BasicObject includes itself in its list of constants.

    authored
  5. Ian Leitch

    Guard a spec as not compliant on Rubinius.

    authored
  6. John Firebaugh

    Use a consistent method for finding timezone abbreviation

    Fixes #1705.
    authored
  7. Ian Leitch

    A misplaced retry statement raising a SyntaxError is a 1.9 feature, a…

    …nd not specific to Fiber#new.
    authored

May 07, 2012

  1. John Firebaugh

    Tag failing specs

    authored
  2. John Firebaugh

    Add specs for :close_others option to Process.spawn

    authored
  3. John Firebaugh

    Remove Open3.popen3 tags

    authored
  4. John Firebaugh

    Workaround for Process.spawn not auto-closing fds

    authored
  5. John Firebaugh

    $? is thread-local in 1.9

    authored
  6. John Firebaugh

    $? is thread-local in 1.9

    authored
  7. John Firebaugh

    Fix Process.detach thread behavior

    authored
  8. John Firebaugh

    Spec Process.detach thread behavior

    authored
  9. John Firebaugh

    Fix CompiledFile unmarshalling

    This Ruby unmarshaller is not currently exercised by normal code
    loading: it uses marshal.cpp instead.
    
    Fixes #1706.
    authored
Something went wrong with that request. Please try again.