Skip to content

Commit

Permalink
executor: add CPU padding for chunk.Iterator4Slice (pingcap#38800)
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-shaoge authored Nov 2, 2022
1 parent caa26a4 commit 17c6c48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/chunk/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

package chunk

import "golang.org/x/sys/cpu"

var (
_ Iterator = (*Iterator4Chunk)(nil)
_ Iterator = (*iterator4RowPtr)(nil)
Expand Down Expand Up @@ -58,8 +60,10 @@ func NewIterator4Slice(rows []Row) Iterator {

// Iterator4Slice is used to iterate rows inside a slice.
type Iterator4Slice struct {
_ cpu.CacheLinePad
rows []Row
cursor int
_ cpu.CacheLinePad
}

// Begin implements the Iterator interface.
Expand Down

0 comments on commit 17c6c48

Please sign in to comment.