Commit 7303bac
Refactor keccak_squeezeblock_x4() to improve proof time.
Removes pointer arithmetic in favour of an integer current_offset value.
Simplifies loop invariant.
Proof time on M1/macOS falls from 127s to 25s for all values of MLKEM_K.
With gcc 14.2.0 on macOS, generated code at -O3 is identical
to the original, so no performance impact expected.
Signed-off-by: Rod Chapman <rodchap@amazon.com>1 parent ddbc21d commit 7303bac
1 file changed
Lines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 107 | + | |
| 108 | + | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
| |||
0 commit comments