mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
core/vm: switch modexp gas computation to uint64
This commit is contained in:
parent
cc158997d3
commit
72c390d3c5
1 changed files with 0 additions and 8 deletions
|
|
@ -458,14 +458,6 @@ func berlinMultComplexity(x uint64) uint64 {
|
|||
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.
|
||||
//
|
||||
// For x <= 32: returns 16
|
||||
|
|
|
|||
Loading…
Reference in a new issue