Skip to content

Commit

Permalink
perf: With StateMap the memory for states are cut in half
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Sep 7, 2018
1 parent 1d74cbf commit 19ff597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dfa.rs
Expand Up @@ -1517,7 +1517,7 @@ impl<'a> Fsm<'a> {
// so we can find it later.
self.cache.size +=
self.cache.trans.state_heap_size()
+ (2 * state.data.len())
+ state.data.len()
+ (2 * mem::size_of::<State>())
+ mem::size_of::<StatePtr>();
self.cache.compiled.insert(state, si);
Expand Down

0 comments on commit 19ff597

Please sign in to comment.