[ruby-cvs:51439] tmm1:r44294 (trunk): ruby.h: swap iv_index_tbl and super for struct RClass

tmm1 at ruby-lang.org tmm1 at ruby-lang.org
Fri Dec 20 14:10:09 JST 2013


tmm1	2013-12-20 14:10:07 +0900 (Fri, 20 Dec 2013)

  New Revision: 44294

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44294

  Log:
    ruby.h: swap iv_index_tbl and super for struct RClass
    
    * include/ruby/ruby.h (struct RClass): add super, remove iv_index_tbl.
      since RCLASS_SUPER() is commonly used inside while loops, we move it
      back inside struct RClass to improve cache hits. this provides a
      small improvement (1%) in hotspots like rb_obj_is_kind_of()
    * internal.h (struct rb_classext_struct): remove super, add
      iv_index_table
    * internal.h (RCLASS_SUPER): update for new location
    * internal.h (RCLASS_SET_SUPER): ditto
    * internal.h (RCLASS_IV_INDEX_TBL): ditto
    * object.c (rb_class_get_superclass): ditto
    * include/ruby/backward/classext.h (RCLASS_SUPER): ditto

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/backward/classext.h
    trunk/include/ruby/ruby.h
    trunk/internal.h
    trunk/object.c


More information about the ruby-cvs mailing list