[#69616] [Ruby trunk - Feature #11258] add 'x' mode character for O_EXCL — cremno@...
Issue #11258 has been updated by cremno phobia.
3 messages
2015/06/16
[#69643] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — normalperson@...
Issue #11276 has been updated by Eric Wong.
3 messages
2015/06/17
[#69751] [Ruby trunk - Bug #11001] 2.2.1 Segmentation fault in reserve_stack() function. — kubo@...
Issue #11001 has been updated by Takehiro Kubo.
3 messages
2015/06/27
[ruby-core:69715] [Ruby trunk - Feature #11299] [PATCH] use Array instead of custom struct for generic ivars
From:
ko1@...
Date:
2015-06-23 23:53:46 UTC
List:
ruby-core #69715
Issue #11299 has been updated by Koichi Sasada. I'm weakly against this proposal because it will consumes more objects and increase GC pressure. I don't think it is valuable compare with reducing binary size by 1KB. BTW, ```ruby - if (FL_ABLE(obj)) RB_OBJ_WRITTEN(obj, Qundef, val); + if (FL_ABLE(obj)) RB_OBJ_WRITTEN(obj, Qundef, ivup.u.ivtbl); ``` Can obj which is !FL_ABLE(obj) be here? ---------------------------------------- Feature #11299: [PATCH] use Array instead of custom struct for generic ivars https://bugs.ruby-lang.org/issues/11299#change-53094 * Author: Eric Wong * Status: Open * Priority: Normal * Assignee: Eric Wong ---------------------------------------- I'll commit this in a few days unless there's an objection. ~~~ This reduces both code and object size while reducing the cognitive overhead necessary to understand the code. Memory usage should be slightly higher due to Array overheads, but still better than what we had in Ruby 2.2 and earlier. text data bss dec hex filename 2837117 22688 71576 2931381 2cbab5 ruby.before 2836221 22688 71576 2930485 2cb735 ruby.after array.c | 28 +++++----- internal.h | 1 + variable.c | 170 +++++++++++++++++++------------------------------------------ 3 files changed, 69 insertions(+), 130 deletions(-) * array.c (rb_mem_clear): use memfill (rb_ary_store_fill): new function (rb_ary_store): use rb_ary_store_fill * internal.h (rb_ary_store_fill): new declaration * variable.c (struct gen_ivtbl): remove (struct ivar_update): adjust type (struct gen_ivar_compat_tbl): ditto (struct gen_ivar_tag): ditto (struct givar_copy): ditto (gen_ivar_compat_tbl_i): adjust for type change (gen_ivtbl_get): ditto (generic_ivar_delete): ditto (generic_ivar_get): ditto (generic_ivar_update): ditto (generic_ivar_defined): ditto (rb_mark_generic_ivar): ditto (rb_free_generic_ivar): ditto (rb_generic_ivar_memsize): ditto (generic_ivar_set): ditto (gen_ivtbl_count): ditto (gen_ivar_each_i): ditto (gen_ivar_copy): ditto (rb_copy_generic_ivar): ditto (rb_ivar_count): ditto (gen_ivtbl_bytes): remove (gen_ivtbl_resize): remove (gen_ivtbl_dup): remove (gen_ivtbl_mark): remove ~~~ ---Files-------------------------------- 0001-use-Array-instead-of-custom-struct-for-generic-ivars.patch (13.6 KB) -- https://bugs.ruby-lang.org/