Blog post: Rust vs Julia in scientific computing

Oh, I thought you wanted to check if the compiler does not optimize out the whole vector because it is not read from.

I did run DHAT on the code currently in the blog post (with outer loop having n = 2^8) and I get the following:

==115== Total:     33,557,613 bytes in 267 blocks

Which is more than 2^8 * 2^14 * 8 = 33,554,432.

I think the advantage of Rust is that it keeps track of the capacity internally:

Where Julia just outsources dealing with the capacity into C:

1 Like