celestiaorg / rsmt2d

Go implementation of two dimensional Reed-Solomon merkle tree data availability scheme.
Apache License 2.0
162 stars 80 forks source link

chore: drop minio/sha256-simd #264

Closed rootulp closed 1 year ago

rootulp commented 1 year ago

Closes https://github.com/celestiaorg/rsmt2d/issues/161 Blocked on https://github.com/celestiaorg/rsmt2d/pull/263

Testing

The BenchmarkEDSRoots benchmark behaves similarly before and after this PR. Since it is computing roots, I assume the SHA256 operations for minio/sha256-simd and Go 1.21's crypto/sha256 perform similarly.

Before

Running tool: /usr/local/go/bin/go test -benchmem -run=^$ -bench ^BenchmarkEDSRoots$ github.com/celestiaorg/rsmt2d

goos: darwin
goarch: arm64
pkg: github.com/celestiaorg/rsmt2d
BenchmarkEDSRoots/32x32x512_ODS-10              1063       1169687 ns/op     1791189 B/op      34052 allocs/op
BenchmarkEDSRoots/64x64x512_ODS-10               392       3056992 ns/op     6203578 B/op     133636 allocs/op
BenchmarkEDSRoots/128x128x512_ODS-10             100      10686539 ns/op    26235561 B/op     530437 allocs/op
BenchmarkEDSRoots/256x256x512_ODS-10              31      42617637 ns/op    106996448 B/op   2110469 allocs/op
BenchmarkEDSRoots/512x512x512_ODS-10               7     158435357 ns/op    490824795 B/op   8419427 allocs/op
PASS
ok      github.com/celestiaorg/rsmt2d   9.528s

After

Running tool: /usr/local/go/bin/go test -benchmem -run=^$ -bench ^BenchmarkEDSRoots$ github.com/celestiaorg/rsmt2d

goos: darwin
goarch: arm64
pkg: github.com/celestiaorg/rsmt2d
BenchmarkEDSRoots/32x32x512_ODS-10              1010       1168943 ns/op     1793211 B/op      34052 allocs/op
BenchmarkEDSRoots/64x64x512_ODS-10               381       3175877 ns/op     6207691 B/op     133636 allocs/op
BenchmarkEDSRoots/128x128x512_ODS-10             100      10775309 ns/op    26243828 B/op     530438 allocs/op
BenchmarkEDSRoots/256x256x512_ODS-10              32      69096212 ns/op    107013057 B/op   2110472 allocs/op
BenchmarkEDSRoots/512x512x512_ODS-10               7     158312988 ns/op    490854710 B/op   8419386 allocs/op
PASS
ok      github.com/celestiaorg/rsmt2d   9.516s
codecov[bot] commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@e1faa53). Click here to learn what that means. The diff coverage is n/a.

:exclamation: Current head 724cf01 differs from pull request most recent head 052f684. Consider uploading reports for the commit 052f684 to get more accurate results

@@           Coverage Diff           @@
##             main     #264   +/-   ##
=======================================
  Coverage        ?   80.83%           
=======================================
  Files           ?        7           
  Lines           ?      793           
  Branches        ?        0           
=======================================
  Hits            ?      641           
  Misses          ?      110           
  Partials        ?       42           
Files Changed Coverage Δ
tree.go 100.00% <ø> (ø)