gll icon indicating copy to clipboard operation
gll copied to clipboard

Move the finite (enum) components out of map keys by splitting map struct fields.

Open eddyb opened this issue 7 years ago • 0 comments

That is, replace something like this (A | B | C would be a parse/code label):

struct Graph {
    children: Map<(A | B | C, Range), V>,
}

to be more like this:

struct Graph {
    a_children: Map<Range, V>,
    b_children: Map<Range, V>,
    c_children: Map<Range, V>,
}

Should be better overall, but may have unexpected cache/heap-related consequences. Also, requires more of the runtime to be code-generated instead of being in a common library.

eddyb avatar Aug 23 '18 23:08 eddyb