3 ms·
There is a little-known Valgrind tool called "DHAT" (short for "Dynamic Heap Analysis Tool") that's designed to help find exactly these sorts of excessive alloc
by nnethercote 9y ago
There is a little-known Valgrind tool called "DHAT" (short for "Dynamic Heap Analysis Tool") that's designed to help find exactly these sorts of excessive allocations.
Here's an old blog post describing it, by DHAT's author: https://blog.mozilla.org/jseward/2010/12/05/fun-n-games-with-dhat/ https://blog.mozilla.org/jseward/2010/12/05/fun-n-games-with...
Here's another blog post in which I describe how I used it to speed up the Rust compiler significantly:
https://blog.mozilla.org/nnethercote/2016/10/14/how-to-speed-up-the-rust-compiler/ https://blog.mozilla.org/nnethercote/2016/10/14/how-to-speed...
And here is the user manual:
http://valgrind.org/docs/manual/dh-manual.html http://valgrind.org/docs/manual/dh-manual.html
- wyldfire 9y ago> I previously had -Ccodegen-units=8 in RUSTFLAGS because it speeds up compile times. ... the resulting rustc was about 5–10% slower. So I’ve stopped using it now. ...why is this the case?
- detaro 9y agoIt breaks the code into smaller modules that are processed independently, thus limiting the scope of optimizations to those modules.