[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...

Issue #11420 has been reported by Koichi Sasada.

11 messages 2015/08/06

[ruby-core:70349] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI

From: Eric Wong <normalperson@...>
Date: 2015-08-12 13:32:53 UTC
List: ruby-core #70349
Btw, did you consider using flexible array to avoid extra malloc
and improve cache locality?

Since we introduce new API anyways, we may change the tbl argument to **
so rb_id_table_insert can modify tbl as needed.  Something like:

int rb_id_table_insert(struct rb_id_table **tbl, ID id, VALUE val);
struct hash_id_table {
    int capa;
    int num;
    int used;
    item_t items[1]; /* flexible array */
};

In This Thread