forked from TrueCloudLab/neoneo-go
16 lines
222 B
Go
16 lines
222 B
Go
|
package bigint
|
||
|
|
||
|
import (
|
||
|
"math/big"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func BenchmarkToPreallocatedBytes(b *testing.B) {
|
||
|
v := big.NewInt(100500)
|
||
|
buf := make([]byte, 4)
|
||
|
|
||
|
for i := 0; i < b.N; i++ {
|
||
|
_ = ToPreallocatedBytes(v, buf[:0])
|
||
|
}
|
||
|
}
|