Skip to content

Commit

Permalink
Merge pull request #14 from lightstep/jmacd/pre_alloc
Browse files Browse the repository at this point in the history
Pre-allocate main buffers
  • Loading branch information
jmacd authored Nov 25, 2019
2 parents fcf92a6 + 30965f6 commit 3a82c69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions varopt.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func New(capacity int, rnd *rand.Rand) *Varopt {
return &Varopt{
capacity: capacity,
rnd: rnd,
L: make(internal.SampleHeap, 0, capacity),
T: make(internal.SampleHeap, 0, capacity),
}
}

Expand Down

0 comments on commit 3a82c69

Please sign in to comment.