Skip to content

Fix fuzzy matching edge cases for 6.0.1 - #34

Merged
ycherkes merged 2 commits into
masterfrom
fix/6.0.1
Sep 17, 2026
Merged

ycherkes merged 2 commits into
masterfrom
fix/6.0.1

Conversation

@ycherkes

Copy link
Copy Markdown
Contributor

Summary

  • Fix near-perfect and empty-input PartialRatio behavior.
  • Make cached WeightedRatio equivalent to uncached scoring.
  • Correctly dispose cached token-sort resources.
  • Validate ExtractTop limits across sequential, cached, parallel, and pipeline
    APIs.
  • Make default preprocessing culture-invariant.
  • Update documentation, changelog, and version metadata to 6.0.1.

Verification

  • NET8.0: 5,138 tests passed.
  • NET10.0: full test suite passed.

@ycherkes
ycherkes merged commit 91e72c3 into master Sep 17, 2026
2 checks passed
@ycherkes
ycherkes deleted the fix/6.0.1 branch September 17, 2026 06:31
ancgate pushed a commit to ancgate/Fuzzion that referenced this pull request Nov 4, 2026
Phase 8 (plan items Raffinert#33, Raffinert#34, P8.1-P8.4).

- Raffinert#33 SIMD batch Ratio: Utils/BatchRatio packs choices of 1-64
  characters into the lanes of System.Numerics.Vector<T> (8/16/32/64-bit
  lanes) and runs the bit-parallel LCS step for all lanes per query
  character; bit tables are built once per Cdist call and reused for
  every row. Used by Cdist with Ratio and QRatio on .NET Core 3.0+.
  Results are bit-for-bit identical to the scalar path. 100 x 2,000
  strings: 3.1-4.3x faster, 2.5-6.5x less memory.
- P8.1: multi-word bit-parallel OSA (osa_hyrroe2003_block) replaces the
  table fallback above 64 characters; the Osa instance reuses its
  pattern at every length. About 2x Levenshtein at 256 (was 38x).
- P8.2: bit-parallel Jaro when both inputs fit in 64 characters after
  trimming to the match window, plus the shared-prefix shortcut. Longer
  inputs keep the scalar algorithm.
- P8.3: DamerauLevenshtein on strings uses a per-thread array for
  characters below 256 instead of a dictionary; 1.7-2x faster (default
  BenchmarkDotNet job). Its string Similarity/Normalized* overloads and
  instance class now use that path too.
- Raffinert#34: docs/benchmarks.md with the measurements; new
  CdistBenchmarks and DamerauLevenshteinBenchmarks. The benchmark
  project can see internals to switch the SIMD path off.

Tests: Phase8SimdTests compare SIMD and scalar Cdist exactly for every
lane width, lane boundaries (1, 7, 8, 9, 31, 32, 33 choices), mixed and
empty choices, non-Latin-1 characters, empty queries, cutoffs and
threads. OSA, Jaro and Damerau changes are covered by the existing
oracle and naive-reference contract tests.

All 5,645 tests pass on net8.0 and net10.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016t3BEHkMD2QGVHNJcT4FuL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant