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

Delay mutations in shuffle so shirking is correct #54

Merged
merged 4 commits into from
Sep 4, 2021

Conversation

TysonMN
Copy link
Member

@TysonMN TysonMN commented Sep 4, 2021

Workaround of hedgehogqa/fsharp-hedgehog#157 for the function shuffle.

This change also improves the runtime from quadratic to linear. The previous runtime was quadratic because of the calls to xs.Length and xs.[i] inside the loop, both of which have linear runtime.

As mentioned in the Wikipedia article, I dropped the guard i <> j because we don't need it.

Let's delay a release a bit longer. I want to see if there is anything else I can improve.

@cmeeren
Copy link
Collaborator

cmeeren commented Sep 4, 2021

Excellent! Thank you so much. Whenever you're ready to release, just create a PR that increments the fsproj version (and optionally polish the release notes if you deem it necessary).

@cmeeren cmeeren merged commit 4bb9c65 into hedgehogqa:master Sep 4, 2021
@TysonMN
Copy link
Member Author

TysonMN commented Sep 4, 2021

Whenever you're ready to release, just create a PR that increments the fsproj version (and optionally polish the release notes if you deem it necessary).

Will do.

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.

2 participants