Evaluate implementation of array backed streams
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Haskell
- Stelle
- 926
- Fork
- 71
- Merge medio
- 6h 49m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di composewell/streamly
-
takeInterval yields nothing, dropInterval drops nothingForse già presa @GuillaumedeVolpiano l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
composewell/streamly#3271 ·
-
Parser: many accepts input that ends inside an elementForse già presa @GuillaumedeVolpiano l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
composewell/streamly#3270 ·
-
aspect:api
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
composewell/streamly#3206 ·
-
api:breaking aspect:api aspect:filesystem
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
composewell/streamly#3203 ·
-
type:performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
composewell/streamly#3200 · 2 commenti ·
Tutte le issue di composewell/streamly
Issue simili
-
bug desktop
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
simplex-chat/simplex-chat#8291 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: C# programs with top-level statements fail to compileForse già presa @AsyncNigam l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9625 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
reflex-0.10Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
commercialhaskell/stackage#8180 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenZeppelin/canton-contracts#140 ·
I maintainer di solito rispondono entro 1 giorno