Compare commits

..
Author SHA1 Message Date
David Peter 0143c9ef2e Describe the Linux cache-clearing example accurately 2026-10-02 11:29:16 +02:00
2 changed files with 6 additions and 9 deletions

No files matched your search

+2 -2
View File
@@ -56,8 +56,8 @@ hyperfine --warmup 3 'grep -R TODO *'
``` ```
Conversely, if you want to run the benchmark for a cold cache, you can use the `-p`/`--prepare` Conversely, if you want to run the benchmark for a cold cache, you can use the `-p`/`--prepare`
option to run a special command before *each* timing run. For example, to clear harddisk caches option to run a special command before *each* timing run. For example, to clear Linux filesystem caches,
on Linux, you can run you can run
```sh ```sh
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
``` ```
+4 -7
View File
@@ -7,7 +7,8 @@
# /// # ///
"""This script performs Welch's t-test on a JSON export file with two """This script performs Welch's t-test on a JSON export file with two
benchmark results to test for a difference in their population mean runtimes.""" benchmark results to test whether or not the two distributions are
the same."""
import argparse import argparse
import json import json
@@ -39,10 +40,6 @@ print(f"t = {t:.3}, p = {p:.3}")
print() print()
if dispose: if dispose:
print( print(f"There is a difference between the two benchmarks (p < {th}).")
f"A statistically significant difference in mean runtime was detected (p < {th})."
)
else: else:
print( print(f"The two benchmarks are almost the same (p >= {th}).")
f"No statistically significant difference in mean runtime was detected (p >= {th})."
)