Skip to content

Add dhat? #51

Closed
Closed
@kcaffrey

Description

@kcaffrey

I added dhat to my repo (which was generated from the template), so that I can run and get output like the following:

$ cargo solve 5 --dhat
    Finished dhat [optimized + debuginfo] target(s) in 0.01s
     Running `target/dhat/05`
dhat: Total:     23,920 bytes in 244 blocks
dhat: At t-gmax: 8,176 bytes in 12 blocks
dhat: At t-end:  0 bytes in 0 blocks
dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_view.html
Part 1: 382895070 (6.2ms)
dhat: Total:     32,528 bytes in 307 blocks
dhat: At t-gmax: 8,384 bytes in 11 blocks
dhat: At t-end:  0 bytes in 0 blocks
dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_view.html
Part 2: 17729182 (4.2ms)

Do you have any interest in getting this upstream? I'm not sure how many people would care to use it. I was mainly curious about optimizing allocations in various computations (e.g. using custom iterators instead of allocating vectors for temporary results) as a learning experience, so I found it useful to be able to see what's going on in the memory allocator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions