2 ms·
Well, it's not so much about performance of existing code as it is about being able to take a high-level view of the design of a program. To pick a bad example,
by thenewwazoo 10y ago
Well, it's not so much about performance of existing code as it is about being able to take a high-level view of the design of a program. To pick a bad example, if I know one function will allocate memory according to a certain pattern (e.g. 2n*sizeof(obj)) and another will just shift an internal pointer around, I predict it'll get easier to reason about the behavior of the code. The semantics of ?alloc+free are exceptionally easy to understand, but I have no idea how or when Rust allocates memory, except for a vague notion of heap vs stack. I suspect there's an elegant relationship between how Rust does its (hidden) memory management and the behavior of the borrow checker, but I haven't come across anything yet linking the two concepts.
Mostly, I think my problem is that I don't know what I don't know. Like I said, I'm green. :)