[ruby-core:69702] Re: [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list

From: Eric Wong <normalperson@...>
Date: 2015-06-22 19:33:15 UTC
List: ruby-core #69702
SASADA Koichi <ko1@atdot.net> wrote:
> I have no opinion about that, if there are no behavior changes.
> All of operations are , same behavior and same computational complexity?

Same behavior for enabled features.  I was not able to test
OPT_STACK_CACHING since it has been broken for a while and
OPT_INSTRUCTIONS_UNIFICATION seems incomplete.

Computation complexity is shifted:

+ APPEND_ELEM, INSERT_ELEM_NEXT, REPLACE_ELEM, REMOVE_ELEM are now
  branchless

- FIRST_ELEMENT, POP_ELEMENT now have branches

- list_next/list_prev/list_tail also have branches compared to
  link->next/link->prev/anchor->last

- get_*_insn need anchor (list_head) argument to stop at tail

I am slightly leaning in favor of this change.

The main advantage is reduction in LoC and common API so it is easier to
modify in the future.

On the other hand, a stripped ruby executable is already 2.8 MB and load
time just loading ruby without gems takes a few hundred milliseconds on
slow drives.

Also, see [misc #10278]

In This Thread

Prev Next