To measure the timing you can do: valgrind --tool=callgrind --dump-instr=yes ./ The output can be viewed in KCachegrind.