By rearranging the fields in the struct from the first example to the second one, performance can be improved and memory usage reduced by sorting fields in Go structs.

type BadStruct struct {
age uint8
IdCardNumber uint64
DateOfBirth uint16
}

type GoodStruct struct {
age uint8
DateOfBirth uint16
IdCardNumber uint64
}