| I work full-time with Rust, use it all the time to see how much memory is being allocated to the heap, make a change and then see if there's a difference, and also for cache misses: valgrind target/debug/rustbinary ==10173== HEAP SUMMARY: ==10173== in use at exit: 854,740 bytes in 175 blocks ==10173== total heap usage: 2,046 allocs, 1,871 frees, 3,072,309 bytes allocated ==10173== ==10173== LEAK SUMMARY: ==10173== definitely lost: 0 bytes in 0 blocks ==10173== indirectly lost: 0 bytes in 0 blocks ==10173== possibly lost: 1,175 bytes in 21 blocks ==10173== still reachable: 853,565 bytes in 154 blocks ==10173== suppressed: 0 bytes in 0 blocks ==10173== Rerun with --leak-check=full to see details of leaked memory valgrind --tool=cachegrind target/debug/rustbinary ==146711== ==146711== I refs: 1,054,791,445 ==146711== I1 misses: 11,038,023 ==146711== LLi misses: 62,896 ==146711== I1 miss rate: 1.05% ==146711== LLi miss rate: 0.01% ==146711== ==146711== D refs: 793,113,817 (368,907,959 rd + 424,205,858 wr) ==146711== D1 misses: 757,883 ( 535,230 rd + 222,653 wr) ==146711== LLd misses: 119,285 ( 49,251 rd + 70,034 wr) ==146711== D1 miss rate: 0.1% ( 0.1% + 0.1% ) ==146711== LLd miss rate: 0.0% ( 0.0% + 0.0% ) ==146711== ==146711== LL refs: 11,795,906 ( 11,573,253 rd + 222,653 wr) ==146711== LL misses: 182,181 ( 112,147 rd + 70,034 wr) ==146711== LL miss rate: 0.0% ( 0.0% + 0.0% ) |