aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmarks/vector-builder-set/pds.go
blob: c4d5b2b74e69b869d028ac639948731ca0c3407f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package pds

import (
	"flag"
)



var nFlag = flag.Int(
	"n",
	1_000,
	"The number of iterations to execute",
)

func MainTest() {
	flag.Parse()
	n := *nFlag

	builder := NewVectorBuilder[int]()
	for i := 0; i < n; i++ {
		builder.Append(i)
	}

	for i := 0; i < n; i++ {
		builder.Set(i, i * 10)
	}
}