Skip to content
systemcoding.dev

Tag

cpp

31 posts

Flat illustration of two options weighed side by side, with the C, C++ and Rust logos.
Performance

Spinlocks vs Mutexes: When Spinning Wins

A spinlock burns a core while it waits and a mutex sleeps. Compare their costs, write a correct C11 spinlock, and see when user-space spinning beats a mutex.

6 min read
Flat illustration of a terminal session, with the C, C++ and Linux logos.
Performance

Time Command-Line Programs With hyperfine

Benchmark any command with hyperfine 1.19: it runs warm-ups and many repetitions, reports mean, spread and range, and compares commands against each other.

7 min read