Comment

Comment by tialaramex

In Rust, don't do this, it's more work and it'll tend to be slower, often much slower.

HashMap implements Extend, so just h0.extend(h1) and you're done, the people who made your HashMap type are much better equipped to optimize this common operation.

In a new enough C++ in theory you might find the same functionality supported, but Quality of Implementation tends to be pretty frightful.

parent tialaramex 10 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton