cpuid
brew install cpuid
v2.3.0
MIT
CPU feature identification for Go
19
30-day installs · #6887
53
90-day · #7187
490
365-day · #5169
1.2k
★ GitHub stars · updated 2mo ago
Build dependencies
Links
- https://github.com/klauspost/cpuid
- GitHub: klauspost/cpuid
- Brew formula source: Formula/c/cpuid.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"go"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "CPU feature identification for Go",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:40+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "cpuid",
"github_default_branch": "master",
"github_last_commit_at": "2026-06-17T09:04:29Z",
"github_readme_excerpt": "# cpuid\nPackage cpuid provides information about the CPU running the current program.\n\nCPU features are detected on startup, and kept for fast access through the life of the application.\nCurrently x86 / x64 (AMD64/i386), ARM (ARM64), and RISC-V (RV64) are supported, and no external C (cgo) code is used, which should make the library very easy to use.\n\nYou can access the CPU information by accessing the shared CPU variable of the cpuid library.\n\nPackage home: https://github.com/klauspost/cpuid\n\n[](https://pkg.go.dev/github.com/klauspost/cpuid/v2)\n[](https://github.com/klauspost/cpuid/actions/workflows/go.yml)\n\n## installing\n\n`go get -u github.com/klauspost/cpuid/v2` using modules.\nDrop `v2` for others.\n\nInstalling binary:\n\n`go install github.com/klauspost/cpuid/v2/cmd/cpuid@latest`\n\nOr download binaries from release page: https://github.com/klauspost/cpuid/releases\n\n### Homebrew\n\nFor macOS/Linux users, you can install via [brew](https://brew.sh/)\n\n```sh\n$ brew install cpuid\n```\n\n## example\n\n```Go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t. \"github.com/klauspost/cpuid/v2\"\n)\n\nfunc main() {\n\t// Print basic CPU information:\n\tfmt.Println(\"Name:\", CPU.BrandName)\n\tfmt.Println(\"PhysicalCores:\", CPU.PhysicalCores)\n\tfmt.Println(\"ThreadsPerCore:\", CPU.ThreadsPerCore)\n\tfmt.Println(\"LogicalCores:\", CPU.LogicalCores)\n\tfmt.Println(\"Family\", CPU.Family, \"Model:\", CPU.Model, \"Vendor ID:\", CPU.VendorID)\n\tfmt.Println(\"Features:\", strings.Join(CPU.FeatureSet(), \",\"))\n\tfmt.Println(\"Cacheline bytes:\", CPU.CacheLine)\n\tfmt.Println(\"L1 Data Cache:\", CPU.Cache.L1D, \"bytes\")\n\tfmt.Println(\"L1 Instruction Cache:\", CPU.Cache.L1I, \"bytes\")\n\tfmt.Println(\"L2 Cache:\", CPU.Cache.L2, \"bytes\")\n\tfmt.Println(\"L3 Cache:\", CPU.Cache.L3, \"bytes\")\n\tfmt.Println(\"Frequency\", CPU.Hz, \"hz\")\n\n\t// Test if we have these specific features:\n\tif CPU.Supports(SSE, SSE2) {\n\t\tfmt.Pri",
"github_repo": "klauspost/cpuid",
"github_stars": 1190,
"github_topics": [],
"homepage": "https://github.com/klauspost/cpuid",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 19,
"installs_365d": 490,
"installs_90d": 53,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "cpuid",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 6887,
"rank_365d": 5169,
"rank_90d": 7187,
"raw_hash": "fff7b05dcc1d68d7",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/cpuid.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "2.3.0",
"versioned_formulae": [],
"why_use_this": null
}