Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More improvements to the DFA's inner loop.
There were two important changes: 1. self.at is used sparingly in favor of a local `let at` binding. This seems to convince the compiler to use a register. 2. Switch the transition table from a `Vec<Box<[StatePtr]>>` to a row-major `Vec<StatePtr>`. (2) is the juicier of the two. It makes more efficient use of the cache. In particular, a critical aspect is that a StatePtr points to the start of a row in the table, which enables indexing in the inner loop with a single ADD instruction. (i.e., `si + byte` instead of `si * #classes + byte`.)
- Loading branch information