@@ -45,24 +45,17 @@ Both standard range (0-235) and full range (0-255) are supported.
45
45
## Requirements
46
46
47
47
* Rust 1.55 and newer (until DCP 0.2: At least Rust 1.39)
48
- * Python3 and Fractions module (needed only if you want to execute the benchmark)
49
48
50
49
### Windows
51
50
52
51
* Install rustup: https://www.rust-lang.org/tools/install
53
- * If you want to execute the benchmark:
54
- * Install Python 3: https://www.python.org/downloads/
55
- * Install fraction module: ` pip install Fraction `
56
52
57
53
### Linux
58
54
59
55
* Install rustup (see https://forge.rust-lang.org/infra/other-installation-methods.html )
60
56
```
61
57
curl https://sh.rustup.rs -sSf | sh
62
58
```
63
- * If you want to execute the benchmark:
64
- * Install Python 3 (example for Ubuntu): `apt install python3`
65
- * Install fraction module: `pip install Fraction`
66
59
67
60
You may require administrative privileges.
68
61
@@ -87,10 +80,28 @@ cargo test
87
80
88
81
Run benchmark:
89
82
```
90
- python benches/geninput.py
91
83
cargo bench
92
84
```
93
85
86
+ Advanced benchamark mode.
87
+ There are two benchmark scripts:
88
+ * `run-bench.ps1` for Windows
89
+ * `run-bench.sh` for Linux and MacOS
90
+
91
+ They allow to obtain more stable results than `cargo bench`, by reducing variance due to:
92
+ * CPU migration
93
+ * File system caching
94
+ * Process priority
95
+
96
+ Moreover, the Linux script support hardware performance counters, e.g. it is possible to output
97
+ consumed CPU cycles instead of elapsed time.
98
+
99
+ Linux examples:
100
+ ```
101
+ ./run-bench -c 1 # runs cargo bench and outputs CPU cycles
102
+ ./run.bench -c 1 -p "/i420" # runs cargo bench, output CPU cycles, filtering tests that contains '/i420'
103
+ ```
104
+
94
105
## WebAssembly
95
106
96
107
Install the needed dependencies:
0 commit comments