test-tlb
Stupid memory latency and TLB tester
test-tlb is a tiny C microbenchmark that explores the performance characteristics of memory access patterns with respect to the CPU’s Translation Lookaside Buffer (TLB) and caches. It walks arrays using different strides and working-set sizes so you can observe when access patterns overflow cache or TLB capacity. By timing tight loops and varying parameters, the program reveals step-changes in latency that map to cache lines, page sizes, and TLB coverage. It is intentionally minimal so you can modify page sizes, strides, or pointer-chasing strategies to run experiments on different machines and kernels. ...