Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In sieve example, end iteration sooner
The Sieve algorithm only requires checking all elements up to and including the square root of the maximum prime you're looking for. After that, the remaining elements are guaranteed to be prime.
- Loading branch information
7cf1f55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at https://github.com/gmfawcett/rust/commit/7cf1f55426570582224e0568c838a29c5f7db5ea
7cf1f55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging gmfawcett/rust/patch-1 = 7cf1f55 into auto
7cf1f55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gmfawcett/rust/patch-1 = 7cf1f55 merged ok, testing candidate = 1c3ddd2
7cf1f55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/1775
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1772
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1766
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1772
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1769
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1768
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1768
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1772
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1766
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1765
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1768
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1424
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1423
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1425
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/262
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/263
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-c/builds/255
7cf1f55
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 1c3ddd2