Bob Friesenhahn <bfrie...@simple.dallas.tx.us> wrote:

> On Thu, 29 Dec 2016, Darko Volaric wrote:
>
>> What are you basing that theory on?
>
>
> Perf is claimed to provide very good results but they are real results based
> on real measurements.  Due to this, the measured results are very different
> for the first time the program is executed and the second time it is
> executed.  Any other factor on the machine would impact perf results.
>
> It seems that cachegrind produces absolutely consistent results which do not
> depend on I/O, multi-core, or VM artifacts.

You're right. Consistency can matter more where measuring
small improvements that add up.

I just tried "valgrind --tool=cachegrind ..." and "perf stat ..."
with the same command. Valgrind result was more indeed
more consistent across multiple runs.

Regarding speed of measurement, the same command
took 13.8 sec with cachegrind vs only 0.28 sec with "perf stat"
and 0.27 sec with neither cachegrind nor perf stat. So
perf stat has almost no overhead whereas cachegrind has a
big overhead, making it impractical when measuring slow
commands.

Dominique
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to