A name used once
The v4-type record with a fourth field, loyalty, of type G, used once.
Occurrences in first-use order. The fields base, bonus, loyalty, rebate, then name.
- F (
fqNames) atbase,bonusandrebate, O = 101 each. Ida: S = 264 > E = 106: aliased asa. - G (
fqNames) atloyalty, O = 88, once. Tentative idb: S = 88 − 13 = 75; E = 1 + 86 + 6 = 93. 75 ≤ 93: spelled out in place, and the table has no entry for it. order-total(names), once: S = 0 ≤ E = 18, spelled out.
Loss decision. Overhead = 118 + 12 + 105 + 0 = 235. Savings 264 > 235, so the envelope is written, 29 bytes smaller: 569 bytes plain, 540 bytes compacted.
A spelling used once is worth an alias only when O − (12 + len(id)) > len(id) + len(s) + 6, that is, when its
occurrence is more than 20 bytes longer than the spelling for a one-letter id. A canonical string is 2 bytes longer, so
it never is. A classic v3 FQName can be: see table-order.