Skip to content

Commit 6cec393

Browse files
Faster exit for Gaussian elim.
1 parent de81301 commit 6cec393

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FindAFactor/_find_a_factor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,10 +932,10 @@ struct Factorizer {
932932
BigInteger result = 1U;
933933
std::vector<BigInteger> toStrike;
934934
auto iIt = smoothNumberMap->begin();
935-
for (size_t i = 0U; i < smoothNumberMap->size(); ++i) {
935+
for (size_t i = 0U; (i < smoothNumberMap->size()) && (result == 1U); ++i) {
936936
boost::dynamic_bitset<size_t> &iRow = iIt->second;
937937
auto jIt = iIt;
938-
for (size_t j = i + 1U; j < smoothNumberMap->size(); ++j) {
938+
for (size_t j = i + 1U; (j < smoothNumberMap->size()) && (result == 1U); ++j) {
939939
++jIt;
940940

941941
boost::dynamic_bitset<size_t> &jRow = jIt->second;

0 commit comments

Comments
 (0)