rayon-rs/rayon

idea: allow splitting that's weighted toward one side

オープン

#477 opened on 2017/11/17

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (450 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (9,410 個のスター)
PR merge metrics
 (平均マージ 9m) (30d で 2 merged PRs)

説明

Usually we just split iterators at len/2. For something like find_first, it may be better to split closer to the front of the iterator, like len/3. Likewise, find_last might prefer something like 2 * len / 3.

For find_last, it might also be a good idea to flip the join arguments, so the latter split is processed first.

I'm not sure if these ideas could be exposed generically, or if the find functions should just implement custom bridge functions to this effect. Part of the challenge is that these are also at the end of the iterator chain, so their immediate input might not a Producer at all.

コントリビューターガイド