You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a hacky counter to see where we're spending bytes. 0 here means that the delta was 0 (but we're really spending 1 byte), and a 1/2/…7 means that we're spending that many bytes encoding the data
We're doing pretty well. We might be spending too many bytes encoding startCol and endCol (24k 2-byte VLQs). We're spending a lot encoding names (10 3-byte VLQs, maybe make this a relative delta?). Lots of bytes spent on kind (13k 3-byte VLQs), but this just means the we didn't insert the kind strings near each other in the names array. We could save 20k by skipping the variable length when there are no variables. But by far the worst is variable encoding, spending 62k 3-byte VLQs.
Might be spending too much on start/end columns (40k 2-byte VLQs). We can save 88kb omitting the start/end lines. Lots of byte spent on encoding the definition's scope index (8k 3-bytes, 36k 4-bytes). We can save 44kb omitting the definition's source index. We could save 22kb omitting the bindings length, or 44kb if we just tied the length to the original scopes length and don't output a bindings length at all. But we're spending 53k 3-bytes and 11k 4-bytes encoding variables names.
The text was updated successfully, but these errors were encountered:
I used a throw-away script to relocate the OriginalScope "kinds" next to each other in the "names" array and updated the numbers in README.md with 667ffaf.
jridgewell@7b22d70
I made a hacky counter to see where we're spending bytes.
0
here means that the delta was 0 (but we're really spending 1 byte), and a1
/2
/…7
means that we're spending that many bytes encoding the dataOriginal Scopes
We're doing pretty well. We might be spending too many bytes encoding
startCol
andendCol
(24k 2-byte VLQs). We're spending a lot encodingnames
(10 3-byte VLQs, maybe make this a relative delta?). Lots of bytes spent onkind
(13k 3-byte VLQs), but this just means the we didn't insert the kind strings near each other in thenames
array. We could save 20k by skipping the variable length when there are no variables. But by far the worst isvariable
encoding, spending 62k 3-byte VLQs.Generated Ranges
Might be spending too much on start/end columns (40k 2-byte VLQs). We can save 88kb omitting the start/end lines. Lots of byte spent on encoding the definition's scope index (8k 3-bytes, 36k 4-bytes). We can save 44kb omitting the definition's source index. We could save 22kb omitting the bindings length, or 44kb if we just tied the length to the original scopes length and don't output a bindings length at all. But we're spending 53k 3-bytes and 11k 4-bytes encoding variables names.
The text was updated successfully, but these errors were encountered: