Re: [PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-28 Thread Tomasz Kaminski
On Wed, May 28, 2025 at 4:27 PM Patrick Palka wrote: > > > > > > > On Tue, May 20, 2025 at 6:32 PM Patrick Palka wrote: > > On Tue, 20 May 2025, Tomasz Kaminski wrote: > > > > > I think I do not have any more suggestions for cases to check, > so the impl LGTM. > > > > It's cool

Re: [PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-28 Thread Patrick Palka
> > > On Tue, May 20, 2025 at 6:32 PM Patrick Palka wrote: > On Tue, 20 May 2025, Tomasz Kaminski wrote: > > > I think I do not have any more suggestions for cases to check, so the > impl LGTM. > > It's cool how many optimizations we came up with for this algorithm :) > >

Re: [PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Tomasz Kaminski
On Tue, May 20, 2025 at 6:32 PM Patrick Palka wrote: > On Tue, 20 May 2025, Tomasz Kaminski wrote: > > > I think I do not have any more suggestions for cases to check, so the > impl LGTM. > > It's cool how many optimizations we came up with for this algorithm :) > > > > > On Tue, May 20, 2025 at

Re: [PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Patrick Palka
On Tue, 20 May 2025, Tomasz Kaminski wrote: > I think I do not have any more suggestions for cases to check, so the impl > LGTM. It's cool how many optimizations we came up with for this algorithm :) > > On Tue, May 20, 2025 at 4:33 PM Patrick Palka wrote: > Changes in v5: >   * d

Re: [PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Tomasz Kaminski
I think I do not have any more suggestions for cases to check, so the impl LGTM. On Tue, May 20, 2025 at 4:33 PM Patrick Palka wrote: > Changes in v5: > * dispatch to starts_with for the both-bidi/common range case > > Changes in v4: > * optimize the both-bidi/common ranges case, as suggeste

Re: [PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Patrick Palka
On Tue, 20 May 2025, Patrick Palka wrote: > Changes in v5: > * dispatch to starts_with for the both-bidi/common range case Forgot to mention: And for a bidi common haystack, prefer iterating forward instead of backward if the needle is at least half the size of the haystack, > > Changes in v

[PATCH v5] libstdc++: Implement C++23 P1659R3 starts_with and ends_with

2025-05-20 Thread Patrick Palka
Changes in v5: * dispatch to starts_with for the both-bidi/common range case Changes in v4: * optimize the both-bidi/common ranges case, as suggested by Tomasz * add tests for that code path Changes in v3: * Use the forward_range code path for a (non-sized) bidirectional haystack,