3 ms·
> Why do I need to? Why can't I let the garbage collector deal with it? Determinism. With Rust lifetimes, you can statically prove when resources will be rele
by bitwize 1y ago
> Why do I need to? Why can't I let the garbage collector deal with it?
Determinism.
With Rust lifetimes, you can statically prove when resources will be released. Garbage collectors provide no such guarantees. It has been shown that garbage-collected languages have a space-performance tradeoff: you need five times as much RAM to achieve the same performance, even with a "good" GC, as the same program with explicit memory management:
https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf https://people.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf
- int_19h 1y agoThat's a paper from 20 years ago. GCs have improved since then.