Stream: contributing

Topic: valgrind speed


view this post on Zulip Folkert de Vries (Dec 30 2022 at 14:03):

just out of interest, for those on linux, what does

time valgrind echo -- "foo"

report for you? I get

Executed in  553.31 millis    fish           external
   usr time  510.96 millis  641.00 micros  510.32 millis
   sys time   28.21 millis   85.00 micros   28.13 millis

which means that valgrind takes 0.5 seconds even for trivial applications. I suspect it's something to do with my build of valgrind. Surely it can be faster than that?

view this post on Zulip Nikolaus Wettstein (Jan 03 2023 at 15:46):

valgrind echo -- "foo" 0,46s user 0,02s system 99% cpu 0,486 total

view this post on Zulip Folkert de Vries (Jan 03 2023 at 15:51):

thanks! roughly similar then. What is your valgrind version?

view this post on Zulip Brendan Hansknecht (Jan 03 2023 at 16:37):

I have valgrind 3.19.0 and it takes 0.56s on my system

view this post on Zulip Brendan Hansknecht (Jan 03 2023 at 16:37):

So basically the same

view this post on Zulip Folkert de Vries (Jan 03 2023 at 16:37):

that is wild right? why would that take so long?

view this post on Zulip Brendan Hansknecht (Jan 03 2023 at 16:59):

I mean, i think it emulates every instruction to make sure it can track allocations properly

view this post on Zulip Brendan Hansknecht (Jan 03 2023 at 16:59):

That is why a lot of people prefer tools like address sanitizer.

view this post on Zulip Named-entity (Jan 03 2023 at 17:33):

Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
valgrind-3.19.0
valgrind echo -- "foo" 2.38s user 0.67s system 21% cpu 13.987 total


Last updated: Jul 06 2025 at 12:14 UTC