https://github.com/theodesp/cache-line
Returns your current CPU cache line size in bytes
https://github.com/theodesp/cache-line
cache cpu-cache cpuinfo node node-gyp
Last synced: 10 months ago
JSON representation
Returns your current CPU cache line size in bytes
- Host: GitHub
- URL: https://github.com/theodesp/cache-line
- Owner: theodesp
- License: mit
- Created: 2017-06-07T21:04:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T16:21:32.000Z (over 6 years ago)
- Last Synced: 2024-10-19T10:00:27.839Z (over 1 year ago)
- Topics: cache, cpu-cache, cpuinfo, node, node-gyp
- Language: C++
- Homepage:
- Size: 15.6 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cache-line
> Returns the current CPU cache line size in bytes
Useful when you need to work with systems programming (locks, threads, optimization etc.).
## Usage
Print the cache line size.
```js
const cacheLineSize = require('cache-line');
console.log("Cache Line is", cacheLineSize()); // 64 on my machine or 0 on failure
```
## Platforms
Works on Linux and MacOS but not for Windows(feel free to PR).
## License
MIT © [Theo Despoudis](https://theodespoudis.com)