Get the latest tech news

Show HN: Single-Header Profiler for C++17


Collection of self-contained header-only libraries for C++17 - DmitriBogdanov/UTL

utl::profiler is single-include solution for localized profiling, it features simple macros to measure how much time is taken by a certain scope / expression / code segment. Such approach however makes the overhead of tree expansion & traversal incredibly high, rendering profiler useless for small tasks. New call-site entry & new node creation are rare slow paths, they only happen during call-graph expansion and will have very little contribution to the runtime outside of measuring very deep recursion.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of C++17

C++17

Photo of header profiler

header profiler

Related news:

News photo

Enum class improvements for C++17, C++20 and C++23