Skip to content

Commit 751955d

Browse files
committed
round down sqrt
1 parent 79582b3 commit 751955d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tools/wasm-reduce/wasm-reduce.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,8 @@ struct Reducer
930930
// the remaining set. We don't want to waste time on very fine-grained
931931
// partitions when we could switch to another reduction strategy
932932
// instead.
933-
if (partition.size() > 0 &&
934-
partition.size() < std::sqrt(nontrivialFuncIndices.size())) {
933+
if (size_t sqrtRemaining = std::sqrt(nontrivialFuncIndices.size());
934+
partition.size() > 0 && partition.size() < sqrtRemaining) {
935935
throw EarlyReturn{};
936936
}
937937

0 commit comments

Comments
 (0)