Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Offset and descending sparse integer keys skip the compact numeric slots (#31 follow-up)

Abierto
#55 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
lua
Área
databases

Línea de trabajo

The admission check is in the sparse branch of lr_rawset in src/runtime.eigs, with the k <= 2*(live+1) test as the gate for compact numeric slots. Read that branch alongside tools/measure/table-memory.lua to see how the existing sparse row is produced, then add offset and descending modes to that script. Done means offset and descending sparse integer keys at density of at least 1/2 land within 1.5x of the ascending sparse row's memory per entry.

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

Descripción

enhancement front-end help wanted

After the #31 compact-table work (fix-31 round 2, 79f76d8), integer keys only use the compact numeric slots when k <= 2*(live integer hash keys + 1) (src/runtime.eigs, sparse branch of lr_rawset). That favours keys that are dense starting from low indices, like the benchmark's root[2*i]. Other sparse integer shapes still take the identity map: an encoded string key per entry, plus key/value slots.

  • Offset sparse keys (t[1003], t[1005], ...): the key stays about 1000 above 2×live, so admission never succeeds.
  • Descending sparse keys (for k = 2000000, 2, -2 do t[k] = 1 end, 1M live): 1,096,380 KB on EigenLua vs 39,080 KB on PUC Lua 5.4 (main: 1,388,768 KB).

Found by the blind critic on fix-31 round 2.

Done when

Sparse integer keys at density >= 1/2 use roughly the same memory per entry whatever their starting offset or insertion order. tools/measure/table-memory.lua gains offset and descending sparse modes, and they come within 1.5x of the ascending sparse row.

Lenguaje dominante
Lua
Estrellas
0
Forks
0
Merge medio
54 min
PR fusionados (30 d)
19

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 InauguralSystems/EigenLua

Todos los issues de InauguralSystems/EigenLua

Issues similares

Más issues de Lua

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.