[ruby-cvs:65505] mrkn:r58333 (trunk): array.c: Improve performance of Array#sort with float elements

mrkn at ruby-lang.org mrkn at ruby-lang.org
Thu Apr 13 16:22:35 JST 2017


mrkn	2017-04-13 16:22:35 +0900 (Thu, 13 Apr 2017)

  New Revision: 58333

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

  Log:
    array.c: Improve performance of Array#sort with float elements
    
    * array.c (sort_2): improve performance of Array#sort with float elements.
    
    * internal.h (cmp_opt_Float, cmp_opt_data): added for checking whether or not
      Float#<=> can be optimizable.
    
    * numeric.c (rb_float_cmp): added for internal use.
    
    * internal.h (rb_float_cmp): ditto.
    
    [Bug #13340]
    [ruby-dev:50023]
    [Fix GH-1539]

  Modified files:
    trunk/array.c
    trunk/internal.h
    trunk/numeric.c


More information about the ruby-cvs mailing list