Date: Tue, 11 Feb 2025 18:45:21 +0100
On Tue, Feb 11, 2025 at 9:30 AM Александр Поваляев via Std-Proposals <
std-proposals_at_[hidden]> wrote:
>
> (1) size_type reduce( const Key& key );
>
> (2)
> template< class K >
> size_type reduce( K&& x );
>
> (3) size_type reduce( const Key& key, size_type count );
>
> (4)
> template< class K >
> size_type reduce( K&& x, size_type count );
>
Multiset is very rarely used and I believe your functionality can be
achieved by just storing vectors inside set. Sure because keys are const
you would pay the roundtrip of extract/reinserting of remainder, but in
most cases using set of vector will increase performance significantly over
using multiset.Or you could extract the part of values that is used to
compute comparisons into the key, and have a map of that key to vector of
values.
std-proposals_at_[hidden]> wrote:
>
> (1) size_type reduce( const Key& key );
>
> (2)
> template< class K >
> size_type reduce( K&& x );
>
> (3) size_type reduce( const Key& key, size_type count );
>
> (4)
> template< class K >
> size_type reduce( K&& x, size_type count );
>
Multiset is very rarely used and I believe your functionality can be
achieved by just storing vectors inside set. Sure because keys are const
you would pay the roundtrip of extract/reinserting of remainder, but in
most cases using set of vector will increase performance significantly over
using multiset.Or you could extract the part of values that is used to
compute comparisons into the key, and have a map of that key to vector of
values.
Received on 2025-02-11 17:45:36