0xMiden / 0xMiden/air-script

Consider adding a fold + reverse operations

Abierto
#481 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
96
Forks
39
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Ideally, we would compute this using a fold or reverse operation here that would be slightly more efficient since we replace the multiplication by an addition
```rust
a_and_b_iter.rev().reduce(|(acc, a_and_b)| acc + acc + a_and_b)
```

More context: limb decompositions can be seen as polynomial evaluation which can be done more efficiently using Horner. We should keep track of the places where we see this pattern and evaluate if it makes sense to add this feature then.
_Originally posted by @adr1anh in https://github.com/0xMiden/air-script/pull/466#discussion_r2382317667_

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Look at the code context from the linked PR #466 discussion to identify the specific location where polynomial evaluation via limb decompositions occurs. Understand the current implementation pattern and how Horner's method could optimize it. The change involves replacing multiplication with addition in a fold or reverse operation, likely in a file handling arithmetic or polynomial computations. Test the refactor by running relevant tests to ensure correctness and performance improvement.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
compilers
Tipo de issue
Refactorización
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.