# klauspost/cpuid

CPU feature identification for Go

Repository: https://github.com/klauspost/cpuid
Canonical: https://ross.abutalabs.com/products/cpuid
Language: Go
License: MIT
License Family: permissive
Last push: 2026-07-20T12:18:53+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 93, release rhythm 66, longevity 100
- inputs: {"age_days": 4160, "days_push": 44, "days_rel": 64, "gap_med": 114.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1216, forks 149 (observed 2026-08-28T04:04:01.212938+00:00)

## What it is
A pure-Go library that detects CPU features and information (vendor, cores, caches, instruction set support) at startup for fast access. Supports x86/x64, ARM64, and RISC-V without cgo, and includes a CLI binary for printing CPU details.

## Use cases
- detect if the CPU supports AVX2 before using SIMD code paths
- get CPU brand name, core count, and cache sizes in Go
- check for SSE4.2 or AES-NI support at runtime
- build CPU-dispatched optimized code in Go
- print CPU information from the command line
- avoid cgo when identifying CPU features

## When to choose
- you need runtime CPU feature detection in Go without cgo
- you want to gate optimized code paths on instruction set availability
- you need detailed CPU info like cache sizes and frequency

## When to avoid
- you need CPU identification on non-x86/ARM/RISC-V architectures
- you need real-time CPU monitoring or temperature/frequency telemetry
- you are not programming in Go

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, sdk
- domain: developer-tools, hardware, performance
- platform: go, windows, cross-platform
- tags: cpu-detection, cpuid, hardware-capabilities, x86, arm64, riscv, no-cgo, linux, macos

## Member repositories
- klauspost/cpuid (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:01.212938+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:17:11.445981+00:00, confidence not recorded.
  - readme: https://github.com/klauspost/cpuid (fetched 2026-08-28T04:04:01.212938+00:00, sha 9ac9d7b0ff0e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
