Skip to content

Commit 4585235

Browse files
authored
Merge pull request algorithmica-org#149 from antirais/prose-patch-1
Improve wording.
2 parents 0d811cc + f01a7d3 commit 4585235

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/english/hpc/profiling/noise.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Getting Accurate Results
33
weight: 10
4+
published: true
45
---
56

67
It is not an uncommon for there to be two library algorithm implementations, each maintaining its own benchmarking code, and each claiming to be faster than the other. This confuses everyone involved, especially the users, who have to somehow choose between the two.
@@ -111,7 +112,7 @@ for (int i = 0; i < N; i++)
111112
checksum ^= lower_bound(q[i]);
112113
```
113114

114-
It is also sometimes convenient to combine the warm-up run with answer validation, it if is more complicated than just computing some sort of checksum.
115+
It is also sometimes convenient to combine the warm-up run with answer validation, if it is more complicated than just computing some sort of checksum.
115116

116117
**Over-optimization.** Sometimes the benchmark is outright erroneous because the compiler just optimized the benchmarked code away. To prevent the compiler from cutting corners, you need to add checksums and either print them somewhere or add the `volatile` qualifier, which also prevents any sort of interleaving of loop iterations.
117118

0 commit comments

Comments
 (0)