Introduce a customized A* algorithm.

This custom algo lazily compute the intersections between words, to avoid too much set operations and database reads
This commit is contained in:
Kerollmops
2020-06-14 12:51:54 +02:00
parent 69285b22d3
commit a8cda248b4
5 changed files with 262 additions and 65 deletions

46
Cargo.lock generated
View File

@ -292,12 +292,6 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
[[package]]
name = "fixedbitset"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
[[package]]
name = "flate2"
version = "1.0.14"
@ -642,9 +636,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "1.3.2"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292"
checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe"
dependencies = [
"autocfg 1.0.0",
]
@ -667,15 +661,6 @@ dependencies = [
"libc",
]
[[package]]
name = "itertools"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.9.0"
@ -805,13 +790,13 @@ dependencies = [
"fst",
"fxhash",
"heed",
"itertools 0.9.0",
"indexmap",
"itertools",
"jemallocator",
"levenshtein_automata",
"memmap",
"once_cell",
"oxidized-mtbl",
"pathfinding",
"rayon",
"roaring",
"serde",
@ -988,15 +973,6 @@ dependencies = [
"winapi 0.3.8",
]
[[package]]
name = "num-traits"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
dependencies = [
"autocfg 1.0.0",
]
[[package]]
name = "num_cpus"
version = "1.13.0"
@ -1041,18 +1017,6 @@ dependencies = [
"winapi 0.3.8",
]
[[package]]
name = "pathfinding"
version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86f4d8cc85ca67860ef4324faf86973a39e4e1c78338987eda29a8e6b6ec0c0e"
dependencies = [
"fixedbitset",
"indexmap",
"itertools 0.8.2",
"num-traits",
]
[[package]]
name = "percent-encoding"
version = "2.1.0"
@ -1979,6 +1943,6 @@ checksum = "c442965efc45353be5a9b9969c9b0872fff6828c7e06d118dda2cb2d0bb11d5a"
dependencies = [
"cc",
"glob",
"itertools 0.9.0",
"itertools",
"libc",
]