Skip to content

Commit

Permalink
Use sort.Ints for better performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeschkies committed Dec 29, 2023
1 parent d02c7fa commit 84acf1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ddsketch/store/buffered_paginated.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (s *BufferedPaginatedStore) compact() {
}

func (s *BufferedPaginatedStore) sortBuffer() {
sort.Slice(s.buffer, func(i, j int) bool { return s.buffer[i] < s.buffer[j] })
sort.Ints(s.buffer)
}

func (s *BufferedPaginatedStore) Add(index int) {
Expand Down

0 comments on commit 84acf1f

Please sign in to comment.