News for hackers. Stuff that matters.
Re:Things you can’t do in Rust (and what to do instead) by xigoi on Saturday May 15, 2021 @11:48AM (#27166258)
Ordered is not the same thing as sorted. If you do swap-removals, there's no way to sort the array back into the original order unless you also keep track of insertion time, which adds memory overhead.
Re:Things you can’t do in Rust (and what to do instead) by kllrnohj on Saturday May 15, 2021 @02:59PM (#27167899)
Storing pointers in a linked list also adds memory overhead, too. Insertion time in nanoseconds is only 8 bytes - same as a single pointer on 64-bits. So half the memory usage as a doubly linked list.