Evaluate implementation of array backed streams
まだ誰も着手していません。
評価
調査の方向性
Start by reading the Stream and StreamK representations and their array-related implementations; the issue does not name specific files or tests. Evaluate whether array-backed storage supports scalable cons, append, and indexing without harming fusion or performance, and whether it can replace StreamK and Arrays. Done requires resolving these design questions, including the proposed mutable, boxed or unboxed, and memory variants.
索引モデルが issue の本文から書いたものです。
説明
Currently the Stream type does not support scalable cons or append, we need to use StreamK for that. It may be possible to do that if the stream representation has an option to be backed by arrays or lists of opaque step functions. Along with the static step and state a Stream can have lists of arrays for storage of already generated items. The head and tail of the stream can have a cons list and snoc list of arrays for cons and snoc. The middle part of the stream could consist of a static step and state for fusion.
We can support faster indexing into stream because we have an array representation now. If the index falls after the head or before the tail we will have to evaluate the stream up to that part and store it in an array. When the cons list at head and the step function is over we can transfer the snoc list at the tail to the cons list at the head and continue appending. To implement O(1) indexing we will need fixed size array chunks and the count of arrays.
For appending of streams we will need lists of Streams in addition to arrays. When consing or snocing a stream - the head/tail list of arrays can be wrapped into a Stream and consed or snoced to the list of streams and the new Stream can then be consed/snoced to it. This may potentially block fusion though?
Instead of lists we can also use an effect to generate a stream e.g. m (Stream m a), that will keep it generic.
If this does not have fusion and performance issues then it can potentially replace StreamK and Arrays (including stream of arrays), simplifying the API significantly. For representing mutable arrays we can have a MutStream variant. Also we may need boxed and unboxed versions to represent unboxed streams more efficiently. We can also choose pinned/unpinned memory for the arrays backing the stream. This representation can also lend itself to SIMD optimizations. Though this will make the current implementation fairly complex.
- 主要言語
- Haskell
- スター
- 926
- フォーク
- 71
- 平均マージ
- 6時間 49分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
composewell/streamly のほかの issue
-
takeInterval yields nothing, dropInterval drops nothing対応中かも @GuillaumedeVolpiano が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
composewell/streamly#3271 ·
-
Parser: many accepts input that ends inside an element対応中かも @GuillaumedeVolpiano が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
composewell/streamly#3270 ·
-
aspect:api
難易度 4/5 1〜2日 初心者へのやさしさ 48/100
composewell/streamly#3206 ·
-
api:breaking aspect:api aspect:filesystem
難易度 4/5 1〜2日 初心者へのやさしさ 35/100
composewell/streamly#3203 ·
-
type:performance
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
composewell/streamly#3200 · コメント 2 件 ·
composewell/streamly の issue をすべて見る
似ている issue
-
bug desktop
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
simplex-chat/simplex-chat#8291 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: C# programs with top-level statements fail to compile対応中かも @AsyncNigam が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
compiler-explorer/compiler-explorer#9625 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs triage type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 3 日以内に返信
-
reflex-0.10オープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
commercialhaskell/stackage#8180 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenZeppelin/canton-contracts#140 ·
メンテナーはふだん 1 日以内に返信