3 ms·
Last time I checked, Rust wasn't great for intrusive data structures, as well as non-tree graphs. Is this better now?
by monocasa 11y ago
Last time I checked, Rust wasn't great for intrusive data structures, as well as non-tree graphs. Is this better now?
- aidenn0 11y agoI'm not sure what you mean by "intrusive data structures" but as far as non-tree graphs, it's only as bad as any other non-managed runtime.
- monocasa 11y agoBy intrusive data structures, I mean data structures where the per node metadata is stored within the struct of the data rather than externally. Linux's list_head is a good example of this. Having one less pointer indirection can make it a bit more cache friendly. And yes, Rust can handle non tree graphs as well as any other unmanaged languages, but the heavy use of 'unsafe' makes me feel icky. : )
- pcwalton 11y agoYou might be interested in this library: https://github.com/dschatzberg/intrusive https://github.com/dschatzberg/intrusive