Subject: [quicwg/base-drafts] Base and the Static Table (#1130)

From: Martin Thomson <[email-masked]>
Date: Wed, 21 Feb 2018 03:51:34 +0000 (UTC)

It is not explained at all that the base is applied to the dynamic table only.

That is, index 1 is a straight index into the static table and that index 62 will use the current number of inserts and the base to determine the actual index into the dynamic table (this is the first table entry only when the number of table inserts and base are the same, if the base is smaller, then it will be further along the table).

To be clear, my logic for finding entries is:

```python
    if i <= 0: error
    if i <= len(staticTable): return staticTable[i-1]
    delta = tableBase - base
    if delta < 0: error
    return dynamicTable[i - len(staticTable) - 1 + delta]
```

It is probably equally valid to assume that the indices for the static table also increment with each iteration of base, but that leads to approximately the same code anyway.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1130

---

From: afrind <[email-masked]>
Date: Wed, 21 Feb 2018 17:52:27 +0000 (UTC)

Perhaps another argument for using separate namespaces for static and dynamic indexes?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1130#issuecomment-367412193

---

From: Martin Thomson <[email-masked]>
Date: Wed, 21 Feb 2018 23:39:33 +0000 (UTC)

Possibly, though I'm not convinced that the separation would be worthwhile.  Especially if we can reclaim more bits for references by making the instruction opcodes shorter.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1130#issuecomment-367516181

---

From: Mike Bishop <[email-masked]>
Date: Thu, 22 Feb 2018 15:59:58 +0000 (UTC)

In your proposed shorter instructions, we could just use the next bit to differentiate static/dynamic.  If we increase the size of the static table, they're equivalent (~128 entries); with the current size, the current arrangement is slightly more compact (albeit less clear to interpret).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/1130#issuecomment-367727572