From: SASADA Koichi Date: 2015-12-09T18:50:16+09:00 Subject: [ruby-core:71991] Re: [Ruby trunk - Feature #11786] [Open] [PATCH] micro-optimize case dispatch even harder On 2015/12/09 18:25, Eric Wong wrote: >> > (Sorry if I overlooked marking) > Wait, putobject calls (and TS_VALUE operands) do not go away when > opt_case_dispatch insn is emitted, so marking keys in literal hash is > redundant. since iseq_set_sequence adds marks for all TS_VALUE. > (but maybe I'm misreading compile.c, too) OMG. You are correct. (I forget that the following instructions) >> > I'm not sure it is worth or not. IMO keeping simple with Hash is better >> > on this case with your measured improvements. > Yes, we can revisit after 2.3 release. Maybe this is appropriate for > sorted array + bsearch since the table is frozen at compile time and > st uses too much memory. I agree. But I'm not sure we can do bsearch (can we compare with different type values?). -- // SASADA Koichi at atdot dot net