[ruby-cvs:70637] normal:r63546 (trunk): gc.c: reduce size slightly by making MEMOP_TYPE_MALLOC zero

normal at ruby-lang.org normal at ruby-lang.org
Sat Jun 2 06:23:20 JST 2018


normal	2018-06-02 06:23:20 +0900 (Sat, 02 Jun 2018)

  New Revision: 63546

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

  Log:
    gc.c: reduce size slightly by making MEMOP_TYPE_MALLOC zero
    
    Most (if not all) architectures have instructions for comparing
    against zero, allowing compilers to generate more compact code.
    
    Other MEMOP_TYPE_* enum values are not compared in hot paths,
    but MEMOP_TYPE_MALLOC is checked in objspace_malloc_increase
    
       text	   data	    bss	    dec	    hex	filename
      84088	    264	   3664	  88016	  157d0	gc-before.o
      83784	    264	   3664	  87712	  156a0	gc.o

  Modified files:
    trunk/gc.c


More information about the ruby-cvs mailing list