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