Re: [PATCH v1] libstdc++: Optimize removal from unique assoc containers [PR112934]

2024-05-17 Thread Barnabás Pőcze
Hi 2024. március 13., szerda 12:43 keltezéssel, Jonathan Wakely írta: > On Mon, 11 Mar 2024 at 23:36, Barnabás Pőcze wrote: > > > > Previously, calling erase(key) on both std::map and std::set > > would execute that same code that std::multi{map,set} would. > > However, doing that is

Re: [PATCH v1] libstdc++: Optimize removal from unique assoc containers [PR112934]

2024-03-14 Thread Barnabás Pőcze
Hi 2024. március 13., szerda 12:43 keltezéssel, Jonathan Wakely írta: > On Mon, 11 Mar 2024 at 23:36, Barnabás Pőcze wrote: > > > > Previously, calling erase(key) on both std::map and std::set > > would execute that same code that std::multi{map,set} would. > > However, doing that is

Re: [PATCH v1] libstdc++: Optimize removal from unique assoc containers [PR112934]

2024-03-13 Thread Jonathan Wakely
On Mon, 11 Mar 2024 at 23:36, Barnabás Pőcze wrote: > > Previously, calling erase(key) on both std::map and std::set > would execute that same code that std::multi{map,set} would. > However, doing that is unnecessary because std::{map,set} > guarantee that all elements are unique. > > It is

[PATCH v1] libstdc++: Optimize removal from unique assoc containers [PR112934]

2024-03-11 Thread Barnabás Pőcze
Previously, calling erase(key) on both std::map and std::set would execute that same code that std::multi{map,set} would. However, doing that is unnecessary because std::{map,set} guarantee that all elements are unique. It is reasonable to expect that erase(key) is equivalent or better than: