Skip to content

Commit 3a82c69

Browse files
authored
Merge pull request #14 from lightstep/jmacd/pre_alloc
Pre-allocate main buffers
2 parents fcf92a6 + 30965f6 commit 3a82c69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

varopt.go

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ func New(capacity int, rnd *rand.Rand) *Varopt {
5151
return &Varopt{
5252
capacity: capacity,
5353
rnd: rnd,
54+
L: make(internal.SampleHeap, 0, capacity),
55+
T: make(internal.SampleHeap, 0, capacity),
5456
}
5557
}
5658

0 commit comments

Comments
 (0)