Skip to content

Returns your current CPU cache line size in bytes

License

Notifications You must be signed in to change notification settings

theodesp/cache-line

Repository files navigation

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

About

Returns your current CPU cache line size in bytes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published