News for hackers. Stuff that matters.
Re:For Better Computing, Liberate CPUs from Garbage Collection by mcguire on Thursday May 09, 2019 @01:52PM (#19870472)
In Rust, does the standard way of implementing a graph structure still use a vector of nodes and indices for edges?

I think I saw a Rust implementation of an arena. Is it working?

Re:For Better Computing, Liberate CPUs from Garbage Collection by holy_city on Thursday May 09, 2019 @02:13PM (#19870675)
>In Rust, does the standard way of implementing a graph structure still use a vector of nodes and indices for edges?

You'd probably want to do this whenever you implement a graph in a performant language, it's faster and safer (depending on the problem). Implementing edges as vectors of pointers is an exercise in memory leaks and data races, imo.

You can see an implementation with adjacency lists here:

https://github.com/bluss/petgraph/blob/master/src/graph_impl...

>I think I saw a Rust implementation of an arena. Is it working?

https://docs.rs/typed-arena/1.4.1/typed_arena/