Tessil / sparse-map

C++ implementation of a memory efficient hash map and hash set
MIT License
334 stars 36 forks source link

Emplace with precalculated hash might be helpful #26

Open lvnohanyan opened 1 year ago

lvnohanyan commented 1 year ago

If we have precalculated hash, emplace/insert might be helpful as well?

lucasexe commented 8 months ago

I'd also like to have this enhancement.

Context: I'm working in a multi-thread environment and I need to unlock the mutex as soon as possible. Having this override for emplace/insert it would be possible to compute the hash before locking the mutex.