mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
![]() Preview and profiler results ---------------------------- Here's some quick profiling in Firefox done on the rust compiler docs: - Before: https://share.firefox.dev/3UPm3M8 - After: https://share.firefox.dev/40LXvYb Here's the results for the node.js profiler: - https://notriddle.com/rustdoc-html-demo-15/trie-perf/index.html Here's a copy that you can use to try it out. Compare it with [the nightly]. Try typing `typecheckercontext` one character at a time, slowly. - https://notriddle.com/rustdoc-html-demo-15/compiler-doc-trie/index.html [the nightly]: https://doc.rust-lang.org/nightly/nightly-rustc/ The fuzzy match algo is based on [Fast String Correction with Levenshtein-Automata] and the corresponding implementation code in [moman] and [Lucene]; the bit-packing representation comes from Lucene, but the actual matcher is more based on `fsc.py`. As suggested in the paper, a trie is used to represent the FSA dictionary. The same trie is used for prefix matching. Substring matching is done with a side table of three-character[^1] windows that point into the trie. [Fast String Correction with Levenshtein-Automata]: https://github.com/tpn/pdfs/blob/master/Fast%20String%20Correction%20with%20Levenshtein-Automata%20(2002)%20(10.1.1.16.652).pdf [Lucene]: https://fossies.org/linux/lucene/lucene/core/src/java/org/apache/lucene/util/automaton/Lev1TParametricDescription.java [moman]: https://gitlab.com/notriddle/moman-rustdoc User-visible changes -------------------- I don't expect anybody to notice anything, but it does cause two changes: - Substring matches, in the middle of a name, only apply if there's three or more characters in the search query. - Levenshtein distance limit now maxes out at two. In the old version, the limit was w/3, so you could get looser matches for queries with 9 or more characters[^1] in them. [^1]: technically utf-16 code units |
||
---|---|---|
.. | ||
alias-1.js | ||
alias-2.js | ||
alias-3.js | ||
alias-4.js | ||
alias.js | ||
asrawfd.js | ||
basic.js | ||
bufread-fill-buf.js | ||
deduplication.js | ||
enum-option.js | ||
exact-case.js | ||
filter-crate.js | ||
fn-forget.js | ||
from_u.js | ||
full-path-function.js | ||
iterator-type-signatures.js | ||
keyword.js | ||
macro-check.js | ||
macro-print.js | ||
never.js | ||
option-type-signatures.js | ||
osstring-to-string.js | ||
parser-bindings.js | ||
parser-errors.js | ||
parser-filter.js | ||
parser-generics.js | ||
parser-hof.js | ||
parser-ident.js | ||
parser-literal.js | ||
parser-paths.js | ||
parser-quote.js | ||
parser-reference.js | ||
parser-returned.js | ||
parser-separators.js | ||
parser-slice-array.js | ||
parser-tuple.js | ||
parser-weird-queries.js | ||
path-maxeditdistance.js | ||
path-ordering.js | ||
primitive.js | ||
println-typo.js | ||
quoted.js | ||
reference-shrink.js | ||
regex.js | ||
return-specific-literal.js | ||
return-specific.js | ||
should-fail.js | ||
simd-type-signatures.js | ||
string-from_ut.js | ||
struct-vec.js | ||
transmute-fail.js | ||
transmute.js | ||
typed-query.js | ||
vec-new.js | ||
vec-type-signatures.js |