|
Hi all, What's the difference between e.g. FastMoore and CompactMoore? When should I prefer one over the other? |
Answered by
mtf90
Jul 15, 2025
Replies: 1 comment
|
The compact implementations typically store adjacency information in a single array whereas the fast implementations store adjacency information at each state individually. Therefore, compact implementations primarily scale with size, whereas fast implementations primarily scale with density. Unless you work with very large/sparse automata (e.g., one million states+), the compact implementations are a safe default. Ironically, the oftentimes lower memory consumption of the compact implementations can make them faster, too (at least in micro benchmarks). |
0 replies
Answer selected by
liamoc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The compact implementations typically store adjacency information in a single array whereas the fast implementations store adjacency information at each state individually. Therefore, compact implementations primarily scale with size, whereas fast implementations primarily scale with density.
Unless you work with very large/sparse automata (e.g., one million states+), the compact implementations are a safe default. Ironically, the oftentimes lower memory consumption of the compact implementations can make them faster, too (at least in micro benchmarks).