Rust hash iteration+reinsertion: accidentally quadratic

It was recently discovered that some surprising operations on Rust’s standard hash table types could go quadratic.
Perhaps the simplest illustration is this snippet from a comment, here simplified…

Similar