In @ned14 's recent STL header benchmark results, <array> stands out as the most expensive STL container header. See https://www.reddit.com/r/cpp/comments/eumou7/stl_header_token_parsing_benchmarks_for_vs2017/ . This is because <array> includes <iterator> (because reverse_iterator used to be in there?), <tuple> (because when we authored <array> the tuple interface wasn't in <type_traits> yet?), and <algorithm> (for _Swap_ranges_unchecked). These are needless overhead for the functionality <array> offers.
It probably would make sense to promote _Swap_ranges_unchecked to <xutility> or similar with all the other "optimized for trivial things" algorithms like copy,
In @ned14 's recent STL header benchmark results,
<array>stands out as the most expensive STL container header. See https://www.reddit.com/r/cpp/comments/eumou7/stl_header_token_parsing_benchmarks_for_vs2017/ . This is because<array>includes<iterator>(becausereverse_iteratorused to be in there?),<tuple>(because when we authored<array>the tuple interface wasn't in<type_traits>yet?), and<algorithm>(for_Swap_ranges_unchecked). These are needless overhead for the functionality<array>offers.It probably would make sense to promote
_Swap_ranges_uncheckedto<xutility>or similar with all the other "optimized for trivial things" algorithms likecopy,