Optimize 128-bit decimal formatting
Los mantenedores suelen responder en 8 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- performance
Línea de trabajo
Start by locating count_digits(native_uint128) and do_format_decimal, then trace how the 64-bit formatter returns the start of its output. Check the existing tests and benchmarks for 128-bit decimal formatting before changing the division path. Done means the proposed operations are removed or replaced without changing formatting results, and benchmarks confirm the performance impact.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi..
current 128-bit decimal formatting path uses division and modulo by 10^19 to reduce values into 64-bit chunks........ and GCC emits __udivti3 and __udivmodti4 calls for these operations.
During this i found two probably redundant operations - please correct me if i'm wrong or missed a point to review here :
count_digits(native_uint128)performs a second 128-bit division when the result is already known to have 39 digits.do_format_decimalcounts the remaining digits again, although the 64-bit formatter already returns the start of the formatted output.
so can we remove these redundant operations and replacing division by 10^19 with an exact three-multiply reciprocal implementation .... 10^19 = 2^19 * 5^19.
anyway in my testing GCC (12.2.0)benchmarks show a 14.6% improvement in fmt::format_to for uniformly distributed 128-bit values and 24.8% for the upper 39-digit range.
- Lenguaje dominante
- C++
- Estrellas
- 25.9k
- Forks
- 3.1k
- Merge medio
- 9 d 12 h
- PR fusionados (30 d)
- 16
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 fmtlib/fmt
-
fmt::formatted_size does not work with fmt::wformat_stringPosiblemente ocupada @Tyagiquamar la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 8 días
-
<stdfloat>Quizá libre de nuevo @shreyas-s1403 la tomó hace 19 días y no hay ningún pull request abierto. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
fmtlib/fmt#4725 · 10 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 8 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
fmtlib/fmt#4518 · 1 comentario · 6 reacciones ·
Los mantenedores suelen responder en 8 días
-
failed to print error code `:s` fail on windows due to encoding errorQuizá libre de nuevo @shreyas-s1403 la tomó hace 19 días y no hay ningún pull request abierto. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
fmtlib/fmt#4436 · 11 comentarios ·
Los mantenedores suelen responder en 8 días
Todos los issues de fmtlib/fmt
Issues similares
-
area:qmc bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 3 días
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ASGC-Game-Jam/asgc-gamejam-2026#563 ·
Los mantenedores suelen responder en 1 día
-
area/ysql kind/bug priority/medium status/awaiting-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yugabyte/yugabyte-db#37523 ·
Los mantenedores suelen responder en 1 día
-
Let agents name their jobsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Cockatrice/Cockatrice#7896 ·
Los mantenedores suelen responder en 1 día