Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Optimize pattern matching #474

@intsuc

Description

@intsuc

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
#> backtracking automaton
# todo

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions