News for hackers. Stuff that matters.
Re:C++17 creates a practical use of the backward array index... by JonChesterfield on Monday April 03, 2023 @05:43PM (#35431717)
A pity the c++ compiler has no way to recognise calls to the c++ library in order to do rewrites like that automatically. It's CSE at the stdlib level, should definitely be possible to do that.
Re:C++17 creates a practical use of the backward array index... by eklitzke on Monday April 03, 2023 @06:38PM (#35432326)
Hard coding behavior like for the STL that seems pretty questionable, especially given that std::map and std::unordered_map have poor performance compared to other alternatives (e.g. absl::btree_map and absl::flat_hash_map, and likewise folly has better implementations).