Skip to content

[stdlib] Add a comment about use of Lemire's nearly divisionless method #38263

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

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

xwu
Copy link
Collaborator

@xwu xwu commented Jul 5, 2021

In follow-up to #38161, make the clever recursion-breaking protocol implementation @_alwaysEmitIntoClient in addition to being unavailable.

Additionally, in follow-up to #25286, add a brief comment in the code about the use of Lemire's nearly divisionless method; the code is very neat but without any comment a reader who is unfamiliar with the algorithm has no easy way of understanding what's going on.

If accepted, this change should be nominated for inclusion in Swift 5.5 as per discussion in #38161.

…ient` and add a comment about use of Lemire's nearly divisionless method
@xwu xwu requested a review from stephentyrone July 5, 2021 19:45
@xwu
Copy link
Collaborator Author

xwu commented Jul 5, 2021

@swift-ci smoke test

@xwu xwu requested a review from lorentey July 5, 2021 19:46
@stephentyrone
Copy link
Contributor

stephentyrone commented Jul 6, 2021

Hah, saw this after I already opened #38272 and #38273

@xwu
Copy link
Collaborator Author

xwu commented Jul 6, 2021

Heh, I threw the @_aEIC change in only because I was already editing the file. The principal purpose of this PR is to add the comment to help readers understand what’s going on. Happy to rebase if your merge goes through.

@xwu xwu changed the title [stdlib] Make unavailable protocol implementation @_alwaysEmitIntoClient [stdlib] Add a comment about use of Lemire's nearly divisionless method Jul 6, 2021
@xwu
Copy link
Collaborator Author

xwu commented Jul 6, 2021

@stephentyrone Looks like it should merge cleanly without a rebase. OK to merge?

@stephentyrone stephentyrone merged commit 1ca4d7c into swiftlang:main Jul 6, 2021
@xwu xwu deleted the random-thoughts branch July 6, 2021 17:35
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