4 ms·
Even for std::map gcc generates identical code: https://godbolt.org/g/C6kooc https://godbolt.org/g/C6kooc https://godbolt.org/g/7RS5PQ https://godbolt.org/g/7
by nandno 10y ago
Even for std::map gcc generates identical code:
https://godbolt.org/g/C6kooc https://godbolt.org/g/C6kooc
https://godbolt.org/g/7RS5PQ https://godbolt.org/g/7RS5PQ
godbolt is a great resource to see just how good modern compilers are.
- SamReidHughes 10y agoI wouldn't say "even" -- that's just another type where the iterator is a trivially copyable/destructable object.