C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Floating an idea: unstable_remove_if and friends

From: Ivan Matek <libbooze_at_[hidden]>
Date: Fri, 7 Feb 2025 01:33:43 +0100
If you could share some code that would be nice.

It is possible that compiler just decided to not unroll one loop and unroll
another or something silly like that.

Although last time I checked this(10+y ago) I also noticed minimal
improvements except for types that do not have efficient move constructor.

On Thu, Feb 6, 2025 at 10:10 PM Ted Lyngmo via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Hi!
>
> I created a few simple test cases to be able to show what would be
> gained by using the set of unstable_* functions since I didn’t have my
> old tests saved.
>
> I’m not sure what’s changed since I wrote the functions, but their
> performance is really bad. Only with very contrived data sets will they
> outperform the “stable” versions. I assume cache locality explains most
> of the difference. I must have been testing them with some bias back
> then or used an ancient computer :)
>
> Anyway, I no longer think they are such a good idea.

Received on 2025-02-07 00:33:56