modexp: use intx::shl() and intx::shr()

Abierto
#1,820 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Start in modexp.cpp at the word-span shr() around line 120 and inspect how it moves words and shifts bits. Check the intx word-span shl() and shr() APIs and their shift limits, then review rem() alongside the division kernels after the specified intx update. Done means the redundant bit-shift loops and normalization shifts are removed while modexp behavior remains correct.

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

Descripción

modexp.cpp has its own shr() for word spans (line 120): it moves the words and then shifts the bits with its own loop. intx has public intx::shl() and intx::shr() for word spans (shifts below 64 bits), which can do the bit part. On the next intx update rem() also has to follow the division kernels, which normalize the words themselves since chfast/intx#412, #413 and #420, so the normalization shifts there go away.

Lenguaje dominante
C++
Estrellas
979
Forks
340
Merge medio
12 h 16 min
PR fusionados (30 d)
25

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ipsilon/evmone

Todos los issues de ipsilon/evmone

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.