Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's ~25% faster than before, especially when the
learn_span
is long.The time complexity of
simulate()
is O(kn^2), where k islearn_limit
and n islearn_span
. It costs ~30s to find the optimal retention withlearn_span=3650
andlearn_limit=10
. In previous implementation, it costs ~40s.cargo test --release -- optimal_retention::tests::optimal_retention
It's not recommended to set a
learn_span
greater than 3650.It costs ~250s to find the optimal retention with
learn_span=10000
.I hope it is the last improvement on FSRS-rs before the release of Anki 24.04. @dae