Commit 4ff18e9
authored
Parallelize scrypt with rayon (#733)
Implements #79
If `p>1`, then the different RoMix blocks are calculated in parallel,
using Rayon.
# Benchmarks
## without `rayon` feature
```
test scrypt_17_2_4 ... bench: 270,342,994.10 ns/iter (+/- 37,060,120.60)
test scrypt_17_8_1 ... bench: 294,787,189.50 ns/iter (+/- 21,095,956.53)
```
## with `rayon` feature
```
test scrypt_17_2_4 ... bench: 116,287,221.00 ns/iter (+/- 12,892,179.24)
test scrypt_17_8_1 ... bench: 290,716,320.30 ns/iter (+/- 13,595,822.07)
```1 parent 9eb3ab1 commit 4ff18e9
4 files changed
+40
-6
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
115 | 126 | | |
116 | 127 | | |
117 | 128 | | |
118 | | - | |
| 129 | + | |
119 | 130 | | |
120 | | - | |
| 131 | + | |
| 132 | + | |
121 | 133 | | |
122 | | - | |
123 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
124 | 143 | | |
0 commit comments