core/vm: switch modexp gas computation to uint64

This commit is contained in:
MariusVanDerWijden 2025-09-02 10:03:01 +02:00
parent cc158997d3
commit 72c390d3c5

View file

@ -458,14 +458,6 @@ func berlinMultComplexity(x uint64) uint64 {
return x return x
} }
// Slow Bigint way (benchmark this)
// func berlinMultComplexity(xInt uint64) *big.Int {
// x := new(big.Int).SetUint64(xInt)
// x = new(big.Int).Add(x, big.NewInt(7)) // x + 7
// x = new(big.Int).Rsh(x, 3) // (x + 7) / 8
// return new(big.Int).Mul(x, x) // ((x + 7) / 8) ^ 2
// }
// osakaMultComplexity implements the multiplication complexity formula for Osaka. // osakaMultComplexity implements the multiplication complexity formula for Osaka.
// //
// For x <= 32: returns 16 // For x <= 32: returns 16