3 ms·
> If you translate Rust to C you won't gain on speed Mostly this is the case, but we do give better aliasing info than C in many cases right now, and that can
by pcwalton 11y ago
> If you translate Rust to C you won't gain on speed
Mostly this is the case, but we do give better aliasing info than C in many cases right now, and that can help optimizations. It depends a lot on your use case.
> Correct me if I'm wrong, but I'm led to believe at least some problems that would be most naturally expressed with graph structures will require reference counting when rewritten in safe Rust.
Most people use petgraph nowadays for graphs, which doesn't use RC; instead it uses indices, which are roughly the same cost as individual heap allocations. They have more computation for lookups, but the computation is usually folded into the addressing mode, and you get better cache behavior.