Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the sample size.rs #129

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Increase the sample size.rs #129

merged 2 commits into from
Dec 11, 2023

Conversation

Expertium
Copy link
Contributor

Since the new method is roughly 2 times faster, how about sacrificing that speed in favor of accuracy? Of course, ideally we want both, but if I had to choose, I would say accuracy is more important in this case.
After this change, the speed should be more or less the same as with the old method.

Expertium and others added 2 commits December 11, 2023 08:35
Since the new method is roughly 2 times faster now, how about sacrificing that speed in favor of accuracy? Of course, ideally we want both, but if I had to choose, I would say accuracy is more important in this case.
@L-M-Sherlock L-M-Sherlock self-requested a review December 11, 2023 07:52
@L-M-Sherlock L-M-Sherlock merged commit d9b69c6 into open-spaced-repetition:main Dec 11, 2023
3 checks passed
@Expertium
Copy link
Contributor Author

Expertium commented Dec 11, 2023

@L-M-Sherlock I think there is an error in this line:
let (mut a, mut b) = (xa.min(xc), xa.max(xc));
Original Python code:

    if xa < xc:
        a = xa
        b = xc
    else:
        a = xc
        b = xa

EDIT: or maybe I just don't understand Rust's syntax, but that line makes no sense to me

@izik1
Copy link

izik1 commented Dec 12, 2023

that looks correct and equivalent to:

let (mut a, mut b) = if xa < xc { (xa, xc) } else { (xc, xa) };

@L-M-Sherlock
Copy link
Member

let (mut a, mut b) = (xa.min(xc), xa.max(xc));

This code is correct. a is the minimum between xa and xc, and b is the maximum between xa and xc.

@Expertium
Copy link
Contributor Author

By the way, how can I tell whether this is implemented in the new beta?

@dae
Copy link
Collaborator

dae commented Dec 14, 2023

Check which fsrs-rs commit Anki currently points to: https://github.com/ankitects/anki/blob/edd38ca06730d7fc16804f52ce10f6bc54c3d145/Cargo.toml#L39

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.

4 participants