Skip to content

HermitCrab FST: two-pass nondeterministic traversal (rejected: 2.3x traversal instances, arc checks down only 1.6%) #596

Closed as not planned

Description

@johnml1135

A port of the investigate_linear_traverse approach. It first merged traversal instances by state, position and variable bindings, then rebuilt captures. It was removed from production.

Measured. On 45 Sena words it used 2.3 times as many traversal instances, cut arc checks by only 1.6%, produced more duplicate matches and raised word clones by 27%. Conformance fixtures pointed the same way.

Why rejected. HermitCrab's traversal already pools instances, and its patterns lack the repeated-group shape needed to repay the capture rebuild. Reopen only for a corpus whose automata have substantial equivalent active-state convergence, with a census showing that capture reconstruction is cheaper than the current traversal. See also the (State, AnnotationIndex) record, which drops bindings from the key and is unsound for the same captures.

Record: https://github.com/sillsdev/machine/blob/2eba2f502338705a4d529d7034cecb6303db7f35/docs/rejected-optimizations/two-pass-nondeterministic-traversal.md
Ledger: https://github.com/sillsdev/machine/blob/2eba2f502338705a4d529d7034cecb6303db7f35/docs/hermitcrab-optimization-ledger.md; disposition: https://github.com/sillsdev/machine/blob/2eba2f502338705a4d529d7034cecb6303db7f35/docs/hermitcrab-perf-2026-09-disposition.md
From #490 (closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions