go version: 1.13.4 Dans le code source sync / once.go , les commentaires suivants mentionnaient "hot path":
type Once struct {
// done indicates whether the action has been performed.
// It is first in the struct because it is used in the hot path.
// The hot path is inlined at every call site.
// Placing done first allows more compact instructions on some architectures (amd64/x86),
// and fewer instructions (to calculate offset) on other architectures.
done uint32
m Mutex
}
Mes questions sont:
Que signifie "chemin chaud" ici?
Est-ce que "C'est le premier dans la structure" rend un accès "hot path" plus efficace? Pourquoi?