mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-11 05:30:07 +00:00
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])
|
||
|
}
|
||
|
}
|