[ruby-cvs:58689] ko1:r51541 (trunk): * id_table.h: introduce ID key table.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Wed Aug 12 17:43:58 JST 2015


ko1	2015-08-12 17:43:55 +0900 (Wed, 12 Aug 2015)

  New Revision: 51541

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

  Log:
    * id_table.h: introduce ID key table.
      [Feature #11420]
      This table only manage ID->VALUE table to reduce overhead of st.
      Some functions prefixed rb_id_table_* are provided.
    * id_table.c: implement rb_id_table_*.
      There are several algorithms to implement it.
      Now, there are roughly 4 types:
        * st
        * array
        * hash (implemented by  Yura Sokolov)
        * mix of array and hash
      The macro ID_TABLE_IMPL can choose implementation.
      You can see detailes about them at the head of id_table.c.
      At the default, I choose 34 (mix of list and hash).
      This is not final decision.
      Please report your suitable parameters or
      your data structure.
      * symbol.c: introduce rb_id_serial_t and rb_id_to_serial()
        to represent ID by serial number.
      * internal.h: use id_table for method tables.
      * class.c, gc.c, marshal.c, vm.c, vm_method.c: ditto.

  Added files:
    trunk/id_table.c
    trunk/id_table.h
  Modified files:
    trunk/ChangeLog
    trunk/class.c
    trunk/common.mk
    trunk/gc.c
    trunk/internal.h
    trunk/marshal.c
    trunk/symbol.c
    trunk/symbol.h
    trunk/vm.c
    trunk/vm_method.c


More information about the ruby-cvs mailing list