Skip to content

Commit

Permalink
Prefer -= 1
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Jan 10, 2024
1 parent e941310 commit 2c64d67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benchmarks/C++/src/havlak.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class HavlakLoopFinder {

// Start node is root of all other loops.
_header[0] = 0;
for (int32_t w = size - 1; w >= 0; w--) {
for (int32_t w = size - 1; w >= 0; w -= 1) {
// this is 'P' in Havlak's paper
Vector<UnionFindNode*> nodePool{};

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/C++/src/permute.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Permute : public Benchmark {
if (n != 0) {
const int32_t n1 = n - 1;
permute(n1);
for (int32_t i = n1; i >= 0; i--) {
for (int32_t i = n1; i >= 0; i -= 1) {
swap(n1, i);
permute(n1);
swap(n1, i);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/C++/src/towers.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Towers : public Benchmark {
}

void build_tower_at(int32_t pile, int32_t disks) {
for (int32_t i = disks; i >= 0; i--) {
for (int32_t i = disks; i >= 0; i -= 1) {
push_disk(new TowersDisk(i), pile);
}
}
Expand Down

0 comments on commit 2c64d67

Please sign in to comment.