Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor: add CPU padding for chunk.Iterator4Slice #38800

Merged
merged 3 commits into from
Nov 2, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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