Offset and descending sparse integer keys skip the compact numeric slots (#31 follow-up)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Lua
- スター
- 0
- フォーク
- 0
- 平均マージ
- 54分
- マージ済み PR(30日)
- 19
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenLua のほかの issue
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
InauguralSystems/EigenLua#60 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
InauguralSystems/EigenLua#63 ·
メンテナーはふだん 1 日以内に返信
-
front-end good first issue
難易度 3/5 半日 初心者へのやさしさ 70/100
InauguralSystems/EigenLua#62 ·
メンテナーはふだん 1 日以内に返信
-
front-end good first issue
難易度 3/5 半日 初心者へのやさしさ 66/100
InauguralSystems/EigenLua#61 ·
メンテナーはふだん 1 日以内に返信
-
1/0 and 0/0 abort the program with 'EigenScript value error: division by zero' (ref: inf / nan)オープンbug eigenscript-gap
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
InauguralSystems/EigenLua#50 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenLua の issue をすべて見る
似ている issue
-
難易度 2/5 1時間未満 初心者へのやさしさ 80/100
mason-org/mason.nvim#2117 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mailcow/mailcow-dockerized#7518 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] rDNS lookups are performed even when the RDNS lists are empty対応中かも @kocaemre が今日担当しました。 オープンbug core plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bunkerity/bunkerweb#4057 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
msys2/MSYS2-packages#6825 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
fw876/helloworld#2066 ·
メンテナーはふだん 1 日以内に返信