| ▲ | tialaramex 2 days ago | |||||||
Although it's true that all of Rust's standard library collections are generic over Allocator, Rust 1.100 only stabilizes useful allocator APIs for Box and Vec If you want to use your MyCustomAllocator with a HashMap or a BinaryHeap or you've lost your mind and want a LinkedList none of that was stabilized yet. Personally I am slightly interested in HashMap, VecDeque and String but I think Vec is much more heavily used than any of those and will illustrate just how thin the pickings are in this space for real. | ||||||||
| ▲ | dnautics 2 days ago | parent | next [-] | |||||||
Don't diss linked lists. Sometimes they are the best data structure. In my language's interpreter, I maintain "contextual layers" and the best data structure for this is a linked list (two different layers might be applied to the same previous layers) | ||||||||
| ▲ | atiedebee 2 days ago | parent | prev [-] | |||||||
Perhaps custom allocators could be interesting for BTreeMap and BTreeSet? I am not familiar with their internal implementation, but as I understand it those should allocate fixed-size blocks, which would benefit from a specialized fixed-size allocator. | ||||||||
| ||||||||