Linear vs decision tree vs backtracking automaton?
Due to the overhead of command execution, decision tree may not be always the most performant
We need to determine the threshold for switching between linear and decision tree based on benchmarks
Due to the huge memory footprint of commands, we also need to take care of code size
Examples
if x [
{a: 0, b: 0} -> 1,
{a: 0, b: 1} -> 2,
{a: 1} -> 3,
]
#> linear
execute if data storage mcx: {scrutinee: {a: 0, b: 0}} run 1
execute if data storage mcx: {scrutinee: {a: 0, b: 1}} run 2
execute if data storage mcx: {scrutinee: {a: 1}} run 3
#> decision tree
execute if data storage mcx: {scrutinee: {a: 0}} run
execute if data storage mcx: {scrutinee: {b: 0}} run 1
execute if data storage mcx: {scrutinee: {b: 1}} run 2
execute if data storage mcx: {scrutinee: {a: 1}} run 3
Examples