| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
- Use BitWord as helper class instead of inheriting in many static methods.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Implement Levenshtein DFA with successor string generation
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implements code for building and evaluating Levenshtein
Deterministic Finite Automata, where the resulting DFA efficiently
matches all possible source strings that can be transformed to the
target string within k max edits. This allows for O(n) matching
of strings. We currently support k in {1, 2}.
Additionally, when matching using a DFA, in the case where the
source string does _not_ match, we can generate the _successor_ string;
the next matching string that is lexicographically _greater_ than
the source string. This string has the invariant that there are no
possibly matching strings within k edits ordered after the source
string but before the successor.
This lets us do possibly massive leaps forward in an ordered
dictionary, turning a scan for matches into a sublinear operation.
Matching and successor generation is fully Unicode-aware. All input
strings are expected to be in UTF-8 (without nulls), and the generated
successor is also encoded as UTF-8. Internally, matching is done on
UTF-32 code points and the DFA itself is built around UTF-32.
UTF-8 decoding of source strings is done in a streaming fashion and
does not require any allocations.
This commit includes a templated core Levenshtein DFA matching (and
successor generation) algorithm and two separate DFA implementations
that can be used; one explicit and one implicit.
The explicit DFA is an immutable DAG built up-front that represents
all DFA states and transitions as explicit nodes and edges in a
graph. This is currently the fastest to evaluate, but the build time
and memory usage means its usage should be preferred for shorter
strings (up to a few hundred chars).
The implicit DFA does not build any graph up-front, but rather
evaluates state transitions on-demand for any given source string.
This is currently slower than the explicit DFA, but its O(1)
memory usage (aside from the memory used by the target string itself)
means that it can be used for arbitrary string lengths.
This code currently exists as a freestanding vespalib utility, and
is not yet wired to any production code (fuzzy matching or similar).
Future optimizations:
* Redesign sparse state representation and stepping logic to be
much less branching, in turn making the code much less likely to
stall the CPU pipeline.
* Emit as much as possible of the successor string suffix by copying
directly from the target string UTF-8 representation instead of
following the DFA and encoding UTF-32 to UTF-8 chars.
|
|\ \
| | |
| | |
| | |
| | | |
vespa-engine/balder/gc-some-obscure-fastos-file-stdout-stderr-support
GC some obscure support in FastOS_File for stderr and stdout.
|
| |/ |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
- Avoid plt indirection and allow more inlining of frequently called code.
|
|\
| |
| |
| |
| | |
vespa-engine/toregge/use-provided-memory-allocator-for-large-arrays
Use provided memory allocator for large arrays.
|
| | |
|
|/
|
|
|
| |
- Add has_weight_iterator to IDocumentWeightAttribute to allow fallback to bitvector.
- Allow filter attributes to enjoy IDirectWeightedSet optimization.
|
| |
|
| |
|
| |
|
|\
| |
| | |
use estimated 80 percentile as benchmark result
|
| | |
|
| |
| |
| |
| | |
also simplify somewhat
|
| | |
|
|\ \
| | |
| | | |
Limit 64-byte dynamic array buffer type alignment based on element type.
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
vespa-engine/toregge/use-faster-way-to-get-entry-size
Use faster way to get entry size.
|
| | |
|
|\ \
| |/
|/|
| |
| | |
vespa-engine/balder/move-count-internal-strucures-cache-structures-correctly
Balder/move count internal strucures cache structures correctly
|
| |
| |
| |
| | |
the cache.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
vespa-engine/havardpe/benchmark-cmp-exch-vs-fetch-add
benchmark compare exchange vs fetch add with contention
|
| | | |
|
| |/
|/| |
|
|\ \
| |/
|/|
| |
| | |
vespa-engine/toregge/store-dynamic-array-size-at-start-of-entry
Store dynamic array size size at start of entry.
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Nexus::run is now static
|
| | |
|
| |
| |
| |
| | |
No change for thread lambdas, but they now get separate Nexus objects.
|
|\ \
| | |
| | |
| | |
| | | |
vespa-engine/toregge/prefer-using-use-std-conditional-t-pass-2
Avoid warning about missing typename in nexus.
|