4 ms·
The same trick should work in Rust as in C or C++. In Java you could create a linked list class, pin the nodes in memory so that the GC doesn't compact them , t
by tsimionescu 3y ago
The same trick should work in Rust as in C or C++. In Java you could create a linked list class, pin the nodes in memory so that the GC doesn't compact them , then apply the same shuffling. In Go you can go back to the C trick, since Go's garbage collector doesn't do any kind of compaction.