Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Precompute closure in
Transducer::determinize()
`closure()` is a fairly expensive operation, and when compiling `apertium-eng.eng.dix` it's needed on average about 4.4 times per state. Precomputing and storing the closure of all states thus leads to significant speedups. | | Before | After | Difference | |----------|---------|---------|------------| | eng time | 23.9 s | 16.8 s | -30% | | eng RAM | 136 MB | 160 MB | +17% | | oci time | 219 s | 163 s | -26% | | oci RAM | 0.98 GB | 1.12 GB | +14% |
- Loading branch information