Documentation
¶
Overview ¶
Package cpu implements processor feature detection used by the Go standard library.
Index ¶
Constants ¶
View Source
const ( Other = iota Intel AMD VIA Transmeta NSC KVM // Kernel-based Virtual Machine MSVM // Microsoft Hyper-V or Windows Virtual PC VMware XenHVM Bhyve Hygon )
View Source
const CacheLineSize = 64
View Source
const GOARCH = "amd64"
View Source
const X86FalseSharingRange = 128
"Loads data or instructions from memory to the second-level cache. To use the streamer, organize the data or instructions in blocks of 128 bytes, aligned on 128 bytes." From <Intel® 64 and IA-32 architectures optimization reference manual>, in section 3.7.3 "Hardware Prefetching for Second-Level Cache"
In practice, I have found use 128bytes can gain better performance than 64bytes (one cache line).
Variables ¶
View Source
var ARM64 arm64
View Source
var PPC64 ppc64
View Source
var S390X s390x
View Source
var X86 x86
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.