.array required if FilterResult is fed to parallel [lazy]
Steven Schveighoffer
schveiguy at gmail.com
Sat Jul 5 15:15:25 UTC 2025
On Saturday, 5 July 2025 at 14:38:55 UTC, Sergey wrote:
> On Friday, 4 July 2025 at 12:32:28 UTC, Steven Schveighoffer
> wrote:
>> I meant the part where a range without length picks a bad
>> number for that value. Is that why we did it? I don’t remember.
>>
>
> Yes
> We’ve experimented with several options there
> But finished with 1
> https://github.com/jinyus/related_post_gen/blob/3955e78fdce28cd516a8349551303736e03ec728/d_con/source/app.d#L56
Yes, but note that posts is an array, with a length. So we did
not run into this problem.
And in any case, if it did not have a length, the number of posts
is around 5k, so 512 wouldn't have been horrible performance.
The issue here is that one thread gets all the work, and the
others are left idle.
-Steve
More information about the Digitalmars-d
mailing list