• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Neptune-Crypto / twenty-first / 15015028344
98%

Build:
DEFAULT BRANCH: master
Ran 14 May 2025 08:06AM UTC
Jobs 1
Files 25
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 May 2025 07:38AM UTC coverage: 97.744% (-0.1%) from 97.852%
15015028344

push

github

web-flow
perf(tip5): Avoid one permutation in `hash_varlen` (#252)

The last step of `hash_varlen` is to read out the hash from the state.
Previous this reading-out was followed by a permutation. But since the
of the sponge is dropped after the termination of this function, the
last permutation is not needed.

For short inputs to `hash_varlen` this gives a significant speedup.
Short instances of `hash_varlen` is used downstream by `neptune-core` in
the pow-guessing process, where this change reduces the number of
permutations from nine to seven.

Added benchmark shows a 28 % speedup when running `hash_varlen` on an
input of length 10. For longer input lengths, this speedup will approach
zero.

Shoutout to @macro-ss for identifying this speedup.

Benchmark results, with this change:
```bash
$ cargo criterion --bench tip5
   Compiling twenty-first v0.48.0 (/home/thv/repos/twenty-first/twenty-first)
    Finished `bench` profile [optimized] target(s) in 4.40s
Gnuplot not found, using plotters backend
tip5/hash_10/Tip5 / Hash 10/10
                        time:   [532.41 ns 532.71 ns 533.02 ns]
                        change: [-0.2022% +0.0630% +0.2673%] (p = 0.66 > 0.05)
                        No change in performance detected.

tip5/hash_pair/Tip5 / Hash Pair/pair
                        time:   [531.36 ns 533.53 ns 536.38 ns]
                        change: [-1.4081% -1.0392% -0.6529%] (p = 0.00 < 0.05)
                        Change within noise threshold.

tip5/hash_varlen/Tip5 / Hash Variable Length/16384
                        time:   [1.0669 ms 1.0682 ms 1.0699 ms]
                        change: [+2.3852% +2.6962% +2.9802%] (p = 0.00 < 0.05)
                        Performance has regressed.
tip5/hash_varlen/Tip5 / Hash Variable Length/10
                        time:   [1.3163 µs 1.3181 µs 1.3198 µs]
                        change: [-28.468% -28.273% -28.108%] (p = 0.00 < 0.05)
                        Performance has improved.

tip5/parallel/Tip5 / Para... (continued)

3 of 3 new or added lines in 1 file covered. (100.0%)

15 existing lines in 1 file now uncovered.

12649 of 12941 relevant lines covered (97.74%)

42869117.79 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
15
97.6
-0.63% twenty-first/src/math/polynomial.rs
Jobs
ID Job ID Ran Files Coverage
1 15015028344.1 14 May 2025 08:06AM UTC 25
97.74
GitHub Action Run
Source Files on build 15015028344
  • Tree
  • List 25
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15015028344
  • 3afe7675 on github
  • Prev Build on master (#14930889998)
  • Next Build on master (#15015233472)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc