4 ms·
I don't understand the problems. Want a better hash map ? Use whatever makes your day here : https://tessil.github.io/2016/08/29/benchmark-hopscotch-map.html h
by jcelerier 8y ago
I don't understand the problems.
Want a better hash map ? Use whatever makes your day here : https://tessil.github.io/2016/08/29/benchmark-hopscotch-map.html https://tessil.github.io/2016/08/29/benchmark-hopscotch-map.... ; they are all header-only just like the standard library's.
Want a vector that does not initialize its elements ? Ask and thou shalt receive: https://github.com/aguinet/pector https://github.com/aguinet/pector
The whole point of C++ is to make it easy for people to write generic libraries beyond de standard base provided by the stdlib. So why won't you use those ?
- gpderetta 8y agoOh, I'm in violent agreement. The single biggest contribution of the STL is its set of concepts more than the actual implementations. If you do not like the specific tradeoffs for a container or algo implementation, you can swap it for a different implementation often without code changes. I.e. you do not need to remove abstraction, you just swap it for a different one. Still it is fair to critique the specific tradeoff done by the standard library.
- stochastic_monk 8y agoIt’s the linear chaining effectively required by the standard. I had an application years ago which was 10x as fast after dropping in khash over unordered_map.
- gpderetta 8y agoIIRC that's because of the iterator and address invalidation requirements that effectively require an node based implementation. But if your code does not rely on these guarantees then, as you suggest, you can swap it with a different implementation with the same interface. You do not have to pay for what you do not use.
- deleted 8y ago[deleted]