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

Reduce x.ParsedKey memory allocation from 72 to 56 bytes by optimizing struct memory alignment #9047

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all 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: 2 additions & 2 deletions x/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@ func CountKey(attr string, count uint32, reverse bool) []byte {

// ParsedKey represents a key that has been parsed into its multiple attributes.
type ParsedKey struct {
ByteType byte
Attr string
Uid uint64
HasStartUid bool
StartUid uint64
Term string
Count uint32
ByteType byte
HasStartUid bool
bytePrefix byte
}

Expand Down
Loading