mirror of
https://github.com/arnaucube/go-iden3-crypto.git
synced 2026-02-07 03:26:39 +01:00
remove the bench
This commit is contained in:
@@ -2,8 +2,10 @@ package poseidon
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/iden3/go-iden3-crypto/poseidon"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -126,3 +128,24 @@ func BenchmarkNeptuneHash(b *testing.B) {
|
|||||||
NeptuneHash(inp, cap) //nolint:errcheck,gosec
|
NeptuneHash(inp, cap) //nolint:errcheck,gosec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkPoseidonHash12Inputs(b *testing.B) {
|
||||||
|
bigArray12 := []*big.Int{
|
||||||
|
big.NewInt(1),
|
||||||
|
big.NewInt(2),
|
||||||
|
big.NewInt(3),
|
||||||
|
big.NewInt(4),
|
||||||
|
big.NewInt(5),
|
||||||
|
big.NewInt(6),
|
||||||
|
big.NewInt(7),
|
||||||
|
big.NewInt(8),
|
||||||
|
big.NewInt(9),
|
||||||
|
big.NewInt(10),
|
||||||
|
big.NewInt(11),
|
||||||
|
big.NewInt(12),
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
poseidon.Hash(bigArray12) //nolint:errcheck,gosec
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -213,27 +213,6 @@ func BenchmarkPoseidonHash8Inputs(b *testing.B) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkPoseidonHash12Inputs(b *testing.B) {
|
|
||||||
bigArray12 := []*big.Int{
|
|
||||||
big.NewInt(1),
|
|
||||||
big.NewInt(2),
|
|
||||||
big.NewInt(3),
|
|
||||||
big.NewInt(4),
|
|
||||||
big.NewInt(5),
|
|
||||||
big.NewInt(6),
|
|
||||||
big.NewInt(7),
|
|
||||||
big.NewInt(8),
|
|
||||||
big.NewInt(9),
|
|
||||||
big.NewInt(10),
|
|
||||||
big.NewInt(11),
|
|
||||||
big.NewInt(12),
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := 0; i < b.N; i++ {
|
|
||||||
Hash(bigArray12) //nolint:errcheck,gosec
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func BenchmarkPoseidonHash16Inputs(b *testing.B) {
|
func BenchmarkPoseidonHash16Inputs(b *testing.B) {
|
||||||
bigArray16 := []*big.Int{
|
bigArray16 := []*big.Int{
|
||||||
big.NewInt(1),
|
big.NewInt(1),
|
||||||
|
|||||||
Reference in New Issue
Block a user