perf(dict)!: Switch to PHF Map

This commit is contained in:
Ed Page 2024-12-30 20:58:17 -06:00
parent da0e536796
commit 7457534850
3 changed files with 180467 additions and 239940 deletions

View file

@ -16,7 +16,8 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
[dependencies]
dictgen = { version = "^0.2", path = "../dictgen" }
phf = "0.11.2"
dictgen = { version = "^0.2", path = "../dictgen", features = ["map"] }
[dev-dependencies]
csv = "1.3"
@ -29,7 +30,6 @@ varcon = { version = "^1.0", path = "../varcon" }
snapbox = "0.6.5"
indexmap = "2.2.6"
divan = "0.1.16"
phf = "0.11.2"
heck = "0.5.0"
[lints]

File diff suppressed because it is too large Load diff

View file

@ -38,10 +38,7 @@ fn codegen() {
snapbox::file!["../benches/benches/ordered_map_codegen.rs"].raw()
);
snapbox::assert_data_eq!(
&trie_content,
snapbox::file!["../src/word_codegen.rs"].raw()
);
snapbox::assert_data_eq!(&map_content, snapbox::file!["../src/word_codegen.rs"].raw());
}
fn generate_trie<W: std::io::Write>(file: &mut W, name: &str, dict: &[u8]) {