An open API service indexing awesome lists of open source software.

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

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)