https://github.com/lovesegfault/cache-size
A Rust library to quickly get the size and line size of your CPU caches.
https://github.com/lovesegfault/cache-size
cache cpu cpu-caches memory performance rust
Last synced: over 1 year ago
JSON representation
A Rust library to quickly get the size and line size of your CPU caches.
- Host: GitHub
- URL: https://github.com/lovesegfault/cache-size
- Owner: lovesegfault
- License: bsd-3-clause
- Created: 2018-08-13T01:50:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T13:59:15.000Z (almost 2 years ago)
- Last Synced: 2025-03-31T12:07:04.559Z (over 1 year ago)
- Topics: cache, cpu, cpu-caches, memory, performance, rust
- Language: Rust
- Homepage: https://docs.rs/cache-size
- Size: 98.6 KB
- Stars: 26
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cache-size
[](https://opensource.org/licenses/BSD-3-Clause) [](https://crates.io/crates/cache-size) [](https://docs.rs/cache-size) 
A library to quickly get the size and line size of your CPU caches.
Currently this crate only supports x86 CPUs, since it relies on the `CPUID` instruction, via
the [`raw_cpuid`][raw_cpuid] crate. It is a goal to support other architectures; PRs are
welcome!
Note that the library will still compile and work on non x86 architectures, but
the result of all the cache queries will be `None`.
---
Check the [Intel 64 and IA-32 Architectures Software Developers Manual](https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf)
for more information on the `CPUID` instruction.
[raw_cpuid]: https://github.com/gz/rust-cpuid