4 ms·
Are there any drawbacks, like maybe it’s slower for single-threaded code?
by kstrauser 2y ago
Are there any drawbacks, like maybe it’s slower for single-threaded code?
- rurban 2y agoNot much, still got all the swiss table tricks
- cbhl 2y agoYou may find the docs for Abseil's containers (upon which these appear to have been built) helpful: https://abseil.io/docs/cpp/guides/container#recommendation https://abseil.io/docs/cpp/guides/container#recommendation In my experience, the main drawback is cognitive complexity: there are not one but four different implementations of map and set provided, each with slightly different memory and compatibility tradeoffs, and using the wrong one may break existing code that depends on (for example) stability of pointers to elements or iterators during set mutation.