r/cpp • u/ShoppingQuirky4189 • Jan 29 '26
Cache Explorer: a visual and interactive profiler that shows you exactly which lines of code cause cache misses
Built a visual cache profiler that uses LLVM instrumentation + simulation to show you exactly which lines cause L1/L2/L3 misses in your C and C++ code (Rust support in active development).
- Hardware-validated accuracy (±4.6% L1, ±9.3% L2 vs Intel perf)
- Source-level attribution (not just assembly)
- False sharing detection for multi-threaded code
- 14 hardware presets (Intel/AMD/ARM/Apple Silicon)
- MESI cache coherence simulation
It's like Compiler Explorer but for cache behavior, providing instant visual feedback on memory access patterns. MIT licensed, looking for feedback on what would make it more useful or even just things you like about it.
243
Upvotes
View all comments
12
u/ohnotheygotme Jan 29 '26
Have you toyed around with any larger projects? How does it scale to large code bases? Would it theoretically be possible to restrict the instrumentation to just a subset of functions? etc.