binast / binjs-ref

Reference implementation for the JavaScript Binary AST format
https://binast.github.io/binjs-ref/binjs/index.html
Other
431 stars 38 forks source link

In Context 0.2, optimize empty arrays #449

Open Yoric opened 5 years ago

Yoric commented 5 years ago

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.