Lazy evaluation chain
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- rust
- Área
- data, performance
Línea de trabajo
Start with the linked pull-request discussion, then inspect the existing ArrayBase methods that could move into ArrayOps. Review the proposed ArrayBase.chain(), LazyChain, and LazyChain.eval() API along with the ownership and copy-versus-in-place decision points. Done requires those design questions to be resolved and the lazy operation chain specified.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Motivation
Following from discussion starting here: https://github.com/rust-ndarray/ndarray/pull/1042#issuecomment-957134294
With contemporary systems, moving the data from memory into caches and registers often dominates the runtime of numerical algorithms depending on how many arithmetic operations they perform relative to each memory access. Fusing operations from multiple passes into a single pass increases this ratio and thereby the likelihood of efficient CPU utilisation. [1]
In theory this problem is solved using loops and/or mapv, but this doesn't provide a very user-friendly interface. Users who want to work at a high level still want to be able to use arr.pow(), arr.log() etc, but also retain the speed of this per-element processing (rather than applying each operation to each element and then the next operation to each element).
Proposed Changes
- We move a subset of the
ArrayBasemethods into anArrayOpstrait. Note: this probably can't be all methods because it can only work for methods that return an array, soaxes,as_slice,getetc don't necessarily make sense - This trait gets implemented by
ArrayBase, but also a new struct calledLazyChain(or something idk) LazyChaingets created byArrayBase.chain()LazyChainwill own (?) anArrayBase, as well as a list of operations that will be sequentially applied to it- Then,
LazyChain.eval()runs these operations sequentially on each element of the owned array, and then returns the modified array
Decision Points
- Names for structs and traits
- Should
LazyChainreturn a copy or a modified in-place array? - Should
LazyChainown the array or just borrow it? Should we have two different types do each?
- Lenguaje dominante
- Rust
- Estrellas
- 4.3k
- Forks
- 391
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rust-ndarray/ndarray
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rust-ndarray/ndarray#1612 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
rust-ndarray/ndarray#1617 · 1 comentario ·
-
Stack overflow in `triu` Abiertobug good first issue
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
rust-ndarray/ndarray#1615 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
rust-ndarray/ndarray#1610 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
rust-ndarray/ndarray#1609 ·
Todos los issues de rust-ndarray/ndarray
Issues similares
-
Accept -c in more positions Abiertoarea: compat bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
area: dogs bug priority: P3 silent failure test-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MystenLabs/sui#28056 · 1 comentario ·
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Luminous-Dynamics/mycelix#2577 ·