briansmith / ring

Safe, fast, small crypto using Rust
Other
3.68k stars 693 forks source link

Enable sha512 instruction extension on Apple silicon #1960

Closed BusyJay closed 5 months ago

BusyJay commented 6 months ago

Tested on M1 and time consumed by sha512 is reduced to half.

digest::oneshot::sha512/0
                        time:   [93.800 ns 94.427 ns 95.059 ns]
                        change: [-55.464% -55.238% -55.020%] (p = 0.00 < 0.05)
                        Performance has improved.
codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.29%. Comparing base (9cb93e0) to head (09860de). Report is 13 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1960 +/- ## ======================================= Coverage 96.29% 96.29% ======================================= Files 135 135 Lines 20663 20669 +6 Branches 226 226 ======================================= + Hits 19898 19904 +6 Misses 730 730 Partials 35 35 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

briansmith commented 5 months ago

@BusyJay I have made the tweaks I suggested above in PR #1978. PTAL.

briansmith commented 5 months ago

This was merged as part of PR #1978. Thanks for submitting this!