core/vm: remove benchmark

This commit is contained in:
Marius van der Wijden 2024-04-08 09:40:42 +02:00
parent 718e83cfd0
commit f599b583a3

View file

@ -24,10 +24,7 @@ import (
"testing"
"time"
bls12381 "github.com/consensys/gnark-crypto/ecc/bls12-381"
"github.com/ethereum/go-ethereum/common"
cryptobls12381 "github.com/ethereum/go-ethereum/crypto/bls12381"
)
// precompiledTest defines the input/output pairs for precompiled contract tests.
@ -307,27 +304,6 @@ func benchJson(name, addr string, b *testing.B) {
}
}
func BenchmarkG1(b *testing.B) {
g1 := new(bls12381.G1Affine)
for i := 0; i < b.N; i++ {
g1.IsInSubGroup()
}
}
func BenchmarkG2(b *testing.B) {
g2 := new(bls12381.G2Affine)
for i := 0; i < b.N; i++ {
g2.IsInSubGroup()
}
}
func BenchmarkKilic(b *testing.B) {
g1 := new(cryptobls12381.PointG1)
for i := 0; i < b.N; i++ {
new(cryptobls12381.G1).InCorrectSubgroup(g1)
}
}
func TestPrecompiledBLS12381G1Add(t *testing.T) { testJson("blsG1Add", "f0a", t) }
func TestPrecompiledBLS12381G1Mul(t *testing.T) { testJson("blsG1Mul", "f0b", t) }
func TestPrecompiledBLS12381G1MultiExp(t *testing.T) { testJson("blsG1MultiExp", "f0c", t) }