gll
gll copied to clipboard
Move the finite (enum) components out of map keys by splitting map struct fields.
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.