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
Show parent comment
2
u/ShoppingQuirky4189 Jan 30 '26
Currently the scaling isn't too great with large projects, which is definitely the next thing I want to optimize for. Restricting the instrumentation is a good idea as well, are you thinking a sort of annotation feature where you could signal if you want to include/exclude a given function?