Fastest way to "ignore" elements from array without removal
z
z at z.com
Tue Feb 16 09:08:33 UTC 2021
On Tuesday, 16 February 2021 at 04:43:33 UTC, Paul Backus wrote:
> On Tuesday, 16 February 2021 at 04:20:06 UTC, z wrote:
>> What would be the overall best manner(in ease of
>> implementation and speed) to arbitrarily remove an item in the
>> middle of an array while iterating through it?
>
> http://phobos.dpldocs.info/std.algorithm.iteration.filter.html
Does filter support multiple arguments for the predicate?(i.e.
using a function that has a "bool function(T1 a, T2 b)" prototype)
If not could still implement the function inside the loop but
that would be unwieldy.
And does it create copies every call? this is important because
if i end up using .filter it will be called a 6 to 8 digit number
of times.
More information about the Digitalmars-d-learn
mailing list