libcpucycles

Microlibrary for counting CPU cycles in benchmarks

brewmacoslinux
Try with needOr install directly
Source

About

Microlibrary for counting CPU cycles

Commands

libcpucycles

Examples

Link libcpucycles to your C program for cycle counting$ gcc -o benchmark benchmark.c -lcpucycles
Include the header in your code to measure CPU cycles$ gcc -I$(brew --prefix libcpucycles)/include -o test test.c -L$(brew --prefix libcpucycles)/lib -lcpucycles
Check installed version and library location$ brew info libcpucycles