[ruby-cvs:62197] mrkn:r55034 (trunk): Optimize enum_sum for a range from int to int

mrkn at ruby-lang.org mrkn at ruby-lang.org
Wed May 18 00:08:33 JST 2016


mrkn	2016-05-18 00:08:33 +0900 (Wed, 18 May 2016)

  New Revision: 55034

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55034

  Log:
    Optimize enum_sum for a range from int to int
    
    * enum.c (enum_sum): Optimize for a range from int to int.
    
    * test/ruby/test_enum.rb (test_range_sum): Move from test_range.rb,
      and add assertions for some conditions.
    
    * test/ruby/test_enum.rb (test_hash_sum): Move from test_hash.rb.
    
    * test/ruby/test_hash.rb, test/ruby/test_range.rb: Remove test_sum.

  Modified files:
    trunk/ChangeLog
    trunk/enum.c
    trunk/internal.h
    trunk/numeric.c
    trunk/test/ruby/test_enum.rb
    trunk/test/ruby/test_hash.rb
    trunk/test/ruby/test_range.rb


More information about the ruby-cvs mailing list