-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Now that we have mem_dbg present, we can determine the memory usage. And presently the trie is larger than the dictionary in memory, which surprised me.
$ cargo test --features mem_dbg memsize -- --nocapture
running 1 test
Reading dictionary file from: /Users/shane/Projects/trie-rs/benches/edict.furigana
Read 185536 words, 3531819 bytes.
Trie size 4174393
Uncompressed size 7984707
test trie::trie_impl::search_tests::memsize ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 114 filtered out; finished in 7.17sI fear it may be because of adding the value on the map. My idea for tackling that is to try changing the TrieLabel into an enum instead of a struct. Then a TrieLabel::Value will mean its parent is the last Label of that entry.
Metadata
Metadata
Assignees
Labels
No labels