Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 475 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 475 Bytes

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.

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