(b *testing.B)
| 525 | } |
| 526 | |
| 527 | func BenchmarkEncodeBigInts(b *testing.B) { |
| 528 | ints := make([]*big.Int, 200) |
| 529 | for i := range ints { |
| 530 | ints[i] = math.BigPow(2, int64(i)) |
| 531 | } |
| 532 | out := bytes.NewBuffer(make([]byte, 0, 4096)) |
| 533 | b.ResetTimer() |
| 534 | b.ReportAllocs() |
| 535 | |
| 536 | for i := 0; i < b.N; i++ { |
| 537 | out.Reset() |
| 538 | if err := Encode(out, ints); err != nil { |
| 539 | b.Fatal(err) |
| 540 | } |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | func BenchmarkEncodeU256Ints(b *testing.B) { |
| 545 | ints := make([]*uint256.Int, 200) |