Re:Show HN: Single-Header Profiler for C++17
by GeorgeHaldane on Monday April 14, 2025 @08:12PM
(#43687689)
Haven't worked with it, but based on initial look it's a quite different thing that stands closer to a frame-based profiler like Tracy (https://github.com/wolfpld/tracy).
As far as differences go:
Microprofile:
- frame-based
- needs a build system
- memory usage starts at 2 MB per thread
- runs 2 threads of its own
- provides system-specific info
- good support for GPU workloads
- provides live view
- seems like a good choice for gamedev / rendering
utl::profiler: - no specific pipeline
- single include
- memory usage starts at approx. nothing and would likely stay in kilobytes
- doesn't run any additional threads
- fully portable, nothing platform specific whatsoever, just standard C++
- doesn't provide system-specific info, just pure timings
- seems like a good choice for small projects or embedded (since the only thing it needs is a C++ compiler)
https://github.com/jonasmr/microprofile
Btw, I recently worked with a library that had their own profiler which generated a Chrome trace file, so you could load it up in the Chrome dev tools to explore the call graph and timings in a fancy UI.
It seems like such a good idea and I wish more profiling frameworks tried to do that instead of building their own UI.