Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jul 2, 2011
  1. @Watson1978
Commits on Jul 1, 2011
  1. @lrz

    fix premature GC in rb_parser_compile_{string,file} by making sure th…

    lrz authored
    …e parser object remains on the stack
  2. @lrz

    avoid a resurrection error

    lrz authored
Commits on Jun 29, 2011
  1. @Watson1978

    remove unnecessary condition in StringScanner because rest_size is al…

    Watson1978 authored
    …ways greater equal than 0.
    
    * before
          user     system      total        real
    length = 5000  0.340000   0.040000   0.380000 (  0.272269)
    length = 10000  0.850000   0.120000   0.970000 (  0.659509)
    length = 20000  2.610000   0.490000   3.100000 (  2.011090)
    
    * after
          user     system      total        real
    length = 5000  0.300000   0.030000   0.330000 (  0.233528)
    length = 10000  0.730000   0.080000   0.810000 (  0.564157)
    length = 20000  2.270000   0.430000   2.700000 (  1.806181)
    
    {{{
    require 'benchmark'
    require 'strscan'
    
    Benchmark.bm do |x|
      x.report "length = 5000" do
        str = "x" * 5000
        s = StringScanner.new(str)
        s.scan(/./) until s.eos?
      end
    
      x.report "length = 10000" do
        str = "x" * 10000
        s = StringScanner.new(str)
        s.scan(/./) until s.eos?
      end
    
      x.report "length = 20000" do
        str = "x" * 20000
        s = StringScanner.new(str)
        s.scan(/./) until s.eos?
      end
    end
    }}}
  2. @Watson1978

    revert c2992da and 1fa3eba

    Watson1978 authored
  3. @lrz

    honor RData dfree() callback

    lrz authored
Commits on Jun 28, 2011
  1. @lrz

    fix a regression in rb_define_class() and rb_define_class_under(), wh…

    lrz authored
    …en checking the superclass if pre-defined classes
Commits on Jun 27, 2011
  1. @lrz
  2. @ferrous26

    Guarantee BINARY encoding of gems that have been fetched

    ferrous26 authored
    This fixes a gem installation issue that looked like:
    {{{
    ERROR:  While executing gem ... (IndexError)
        You can't cut a surrogate in two in an encoding that is not UTF-16
    }}}
    
    Committing on behalf of @vincentisambart
Commits on Jun 26, 2011
  1. @ferrous26
  2. @lrz

    add Pointer#to_object which returns the pointer address as a true obj…

    lrz authored
    …ect, to use only in certain circumstances
Commits on Jun 25, 2011
  1. @ferrous26

    Optimize running time for the ruby_deploy specs

    ferrous26 authored
    By caching deployed apps, and introducing a little more mocking.
    
    Before, the suite would take ~71 seconds on my machine, now it takes ~40 seconds.
  2. @lrz

    optimize rb_intern()

    lrz authored
Commits on Jun 24, 2011
  1. @Watson1978

    Performance improvement in IO#puts.

    Watson1978 authored
    * before
          user     system      total        real
    puts one char  0.290000   0.400000   0.690000 (  0.683528)
    
    * after
          user     system      total        real
    puts one char  0.120000   0.350000   0.470000 (  0.461036)
    
    {{{
    require 'benchmark'
    require 'tempfile'
    
    file = open('/tmp/puts_benchmark', 'w')
    char = 'a'
    
    Benchmark.bm do |x|
    
      x.report do
        100000.times do
          file.puts char
        end
      end
    end
    }}}
Commits on Jun 23, 2011
  1. @ferrous26
  2. @ferrous26
  3. @Watson1978
  4. @ferrous26

    Add spec tests for #1313

    ferrous26 authored
  5. @ferrous26
  6. @Watson1978

    fix a bug of Regexp#match. Regexp#match(str, pos) was broken when was…

    Watson1978 authored
    … passed a pos.
    
    Test Script:
    {{{
    require 'test/unit/assertions.rb'
    include Test::Unit::Assertions
    
    str = 'This is an example string'
    reg = Regexp.new(/\w+/)
    assert_equal("is", reg.match(str, 4)[0])
    assert_equal("an", reg.match(str, 8)[0])
    assert_equal("g", reg.match(str, -1)[0])
    
    puts :ok
    }}}
Commits on Jun 21, 2011
  1. @lrz

    Merge pull request #32 from MSch/ticket-1329

    lrz authored
    Make compile targets depend on main target, embed target depend on
  2. @MSch
  3. @takaokouji
  4. @ferrous26

    Make ruby_deploy check the entire embedded framework

    ferrous26 authored
    And also improve the output, when an offending bundle is found only the potentially
    bad linked libraries are listed.
Commits on Jun 20, 2011
Commits on Jun 19, 2011
  1. @Watson1978

    Optimize the rary_splice().

    Watson1978 authored
    * before
                   user     system      total        real
    len == rlen  0.860000   0.000000   0.860000 (  0.852845)
    len != rlen 21.180000   0.010000  21.190000 ( 21.186979)
    
    * after
                    user     system      total        real
    len == rlen  0.050000   0.000000   0.050000 (  0.056620)
    len != rlen  0.150000   0.000000   0.150000 (  0.145373)
    
    {{{
    require 'benchmark'
    
    Benchmark.bm(10) do |x|
      ary =  Array.new(1000)
      tmp =  ["a"] * 1100
      x.report "len ==  rlen" do
        10000.times do
          ary[100, tmp.size] =  tmp
        end
      end
    
      x.report "len !=  rlen" do
        10000.times do
          ary[100, tmp.size - 1] =  tmp
        end
      end
    end
    }}}
  2. @Watson1978

    Optimize the ary_shared_first().

    Watson1978 authored
    * before
                    user     system      total        real
    shift       1.410000   0.020000   1.430000 (  0.778395)
    shift(10)   0.910000   0.040000   0.950000 (  0.718543)
    shift(100)  1.830000   0.090000   1.920000 (  1.379111)
    
    * after
                    user     system      total        real
    shift       1.410000   0.030000   1.440000 (  0.778768)
    shift(10)   0.970000   0.030000   1.000000 (  0.720666)
    shift(100)  1.190000   0.080000   1.270000 (  0.890673)
    
    {{{
    require 'benchmark'
    
    Benchmark.bm(10) do |x|
    
      x.report "shift" do
        50.times do
          ary  = ['obj'] * 100000
          1000.times do
            ary.shift
          end
        end
      end
    
      x.report "shift(10)" do
        50.times do
          ary  = ['obj'] * 100000
          1000.times do
            ary.shift(10)
          end
        end
      end
    
      x.report "shift(100)" do
        50.times do
          ary  = ['obj'] * 100000
          1000.times do
            ary.shift(100)
          end
        end
      end
    
    end
    }}}
  3. @Watson1978

    Optimize the rary_insert().

    Watson1978 authored
    * before
                                   user     system      total        real
    filled object / string     0.990000   0.000000   0.990000 (  0.981791)
    filled object / numeric    0.930000   0.000000   0.930000 (  0.928791)
    empty array / string       0.160000   0.010000   0.170000 (  0.095161)
    empty array / numeric      0.010000   0.000000   0.010000 (  0.015316)
    
    * after
                                   user     system      total        real
    filled object / string     0.060000   0.000000   0.060000 (  0.057018)
    filled object / numeric    0.050000   0.000000   0.050000 (  0.051273)
    empty array / string       0.080000   0.000000   0.080000 (  0.045073)
    empty array / numeric      0.020000   0.000000   0.020000 (  0.014007)
    
    {{{
    require 'benchmark'
    
    Benchmark.bm(25) do |x|
    
      ary  = ['obj'] * 10000
      x.report "filled object / string" do
        1000.times do
          ary.unshift("a")
        end
      end
    
      ary  = ['obj'] * 10000
      x.report "filled object / numeric" do
        1000.times do
          ary.unshift(0)
        end
      end
    
      ary = Array.new(10000)
      x.report "empty array / string" do
        1000.times do
          ary.unshift("a")
        end
      end
    
      ary = Array.new(10000)
      x.report "empty array / numeric" do
        1000.times do
          ary.unshift(0)
        end
      end
    
    end
    }}}
Commits on Jun 18, 2011
  1. @Watson1978

    Optimize Array.new with block.

    Watson1978 authored
    * before
                       user     system      total        real
    without block  0.280000   0.060000   0.340000 (  0.185518)
    with block     0.680000   0.120000   0.800000 (  0.517797)
    
    * after
                       user     system      total        real
    without block  0.290000   0.060000   0.350000 (  0.186769)
    with block     0.490000   0.040000   0.530000 (  0.394732)
    
    {{{
    require 'benchmark'
    
    Benchmark.bm(13) do |x|
      x.report "without block" do
        1000.times do
          Array.new(10000)
        end
      end
    
      x.report "with block" do
        1000.times do
          Array.new(10000) {|i| }
        end
      end
    end
    }}}
  2. @Watson1978
  3. @Watson1978

    add skip in UnitTest.

    Watson1978 authored
Commits on Jun 17, 2011
  1. @takaokouji
Something went wrong with that request. Please try again.