binast / binjs-ref

Reference implementation for the JavaScript Binary AST format

Home Page:https://binast.github.io/binjs-ref/binjs/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In Context 0.2, optimize empty arrays

Yoric opened this issue · comments

Quoted from @dominiccooney

The presence of an EmptyCodeTable could suppress encoding the length for a given array, which must be zero at that point.

If I understand correctly, the idea is to use EmptyCodeTable for 0-length arrays, instead of a UnitCodeTable followed by a 32-bit length.