exploration: speed up rescue_prime_regular benchmark (not for merging) by int-e · Pull Request #70 · Neptune-Crypto/twenty-first

2 min read Original article ↗

added 2 commits

December 22, 2022 09:52
rescue_prime_regular/hash_10/RescuePrimeRegular / Hash 10/10
                        time:   [24.362 µs 24.391 µs 24.422 µs]
                        change: [-35.922% -35.807% -35.704%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

rescue_prime_regular/hash_varlen/RescuePrimeRegular / Hash Variable Length/16384
                        time:   [65.256 ms 65.293 ms 65.331 ms]
                        change: [-30.331% -30.268% -30.215%] (p = 0.00 < 0.05)
                        Performance has improved.
rescue_prime_regular/hash_10/RescuePrimeRegular / Hash 10/10
                        time:   [20.067 µs 20.122 µs 20.193 µs]
                        change: [-17.079% -16.598% -15.936%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

rescue_prime_regular/hash_varlen/RescuePrimeRegular / Hash Variable Length/16384
                        time:   [36.210 ms 36.480 ms 36.808 ms]
                        change: [-44.515% -44.129% -43.708%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 50 measurements (6.00%)
  3 (6.00%) high severe

@int-e int-e mentioned this pull request

Dec 22, 2022

@Sword-Smith

@Sword-Smith

@jan-ferdinand @Sword-Smith

@jan-ferdinand @Sword-Smith

Co-authored-by: sword-smith <thor@neptune.cash>

@Sword-Smith

Sword-Smith added a commit that referenced this pull request

Dec 22, 2022
- Avoids all branching (conditional jumps) in B field addition, see #70
- Makes the Rescue Prime round constants and matrices into const B field
  elements, as opposed to const u64 that had to go through `montyred` at
  runtime.

Co-authored-by: Ferdinand Sauer <ferdinand@neptune.cash>
Co-authored-by: Bertram Felgenhauer <int-e@gmx.de>