Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#55 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
lua
Ambito
databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Lua
Stelle
0
Fork
0
Merge medio
54m
PR unite (30g)
19

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di InauguralSystems/EigenLua

Tutte le issue di InauguralSystems/EigenLua

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.